Hacker News new | past | comments | ask | show | jobs | submit | hcm's comments login

I can't recommend nand2tetris highly enough – it's a great crash course in computer architecture, operating systems, compilers, etc. but also it's just mega fun.

A big part of the joy came from making up my own extra credit side quests: implementing a compile-to-WASM emulator for the hack machine, adding optimisations to the compiler to produce smaller and/or faster programs, etc.


Ooh, I also did the compile-to-WASM side quest! There are some really fun optimizations one can do to make the emulation run faster.

It's orders of magnitude faster than my naive hand-written emulator.



Thanks! It's just a few dozen lines of CSS. The body font is Inter and the monospaced font is JetBrains Mono.


Doh! Thanks for pointing out another silly mistake – I'll fix that.


You had it right the first time, 1.7x speed is 70% faster.

If something previously took 4s now takes 2s then it's 100% faster.

Think of driving 10miles. If you drive at 20mph then it takes 30 minutes. If you drive twice as fast, 40mph, it takes 15 minutes.

40mph is 100% faster than 20mph.

Half the time is twice as fast!


Glad it wasn't just me thinking this!


I disagree, I think the 70% is right, and matches what you still describe as a 1.7x speed increase. If it originally took 4 seconds and now takes 2, I'd call that a 100% speed increase, i.e. twice as fast.


@hcm: Would have loved to see the 'after' flamegraph just for comparison purposes! I'm still trying to get used to groking flamegraphs when optimizing. They're a somewhat new tool, IMO.


(Author here) I don't see that in Chrome so had no idea that was happening – thanks for pointing it out! I'm not a fan of coding ligatures so I just pushed a change to turn it off.


I built https://grephub.com for that. It doesn’t maintain an index so it’s not super snappy, but it’s good enough / better than you’d expect in many cases!


Thanks!


Thanks! We have plans to make it even more awesome from within GitHub :-)


Great article. We've just moved a large portion of our async jobs over from Resque to Que because of the huge benefits you get from transactional enqueuing and processing. Performance seems good so far, and if it really becomes an issue, running two queuing systems side by side (one transactional, one high-throughput) seems viable.

We're super cautious about long-running transactions anyway, as they cause a load of other issues (e.g. http://www.databasesoup.com/2013/11/alter-table-and-downtime... - full blog post coming soon!)



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: