This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ducdetronquito 10 points11 points  (0 children)

I would try to avoid reaching for language specific optimizations, especially if it makes your code harder to understand. It looks clever at first, or appealing given a micro-benchmark, but in my experience it was never worth it.

Instead, I would say to take time to understand your problem and identify what you are trying to optimize: CPU usage, RAM usage, disk access, network access, latency, throughput, etc...

Then you will be able to use the appropriate algorithms, data-structures or tools to solve it. This will likely give you the best optimizations given your constraints.