Live data from Hacker News

Ask HN: What are the 20% tips that will get my code to performance 80% faster?

news.ycombinator.com

1–10 of 69 posts

Re: Ask HN: What are the 20% tips that will get my code to performance 80% faster?

#4
Use hash tables, hash maps, dictionaries, JavaScript objects, etc. (whatever it's called in your language of choice) for indexing.

This gives you constant time access to data by whatever properties you want to index on (usually by id).

Also, use libraries and reuse your own code/routines. If you find a faster way to do something, all the code that used those routines will benefit immediately.

Re: Ask HN: What are the 20% tips that will get my code to performance 80% faster?

#10

I suggest you to read a book about algorithms. This one is pretty good: "Introduction to Algorithms" by Cormen and Rivest.

There is also a lot of great material on Coursera, MIT OpenCourseWare, etc. on algorithms.
Post reply on HN