News for hackers. Stuff that matters.
Re:Ask HN: What are the 20% tips that will get my code to pe... by lebinh on Sunday February 01, 2015 @11:19AM (#8980433)
Measure and profile the code will always be the best thing to do but for simple 20% effort tips I think it would be:

* Don't write your own data structure, stick to the standard library or, in some rare cases, popular and well-known 3-rd party lib.

* Always prefer a Hash or a Set over anything else.

* Beware of any nested loops.

* Have some local / external caches and try memoization.

* Try parallelizing or better, non-blocking wait for all I/O operations.

There are no comments on this comment yet.