News for hackers. Stuff that matters.
Re:The Perils of JavaSchools by onan_barbarian on Monday September 12, 2011 @04:38PM (#2988809)
> all you can really do is code C, compile with -O2, and then guess and check on optimizations

This is just not true for performance-critical code. I've seen huge swings in performance from hand-arranging code to achieve better instruction-level parallelism, less loop overhead, etc. Not an order of magnitude but 3-5x routinely.

This is not worth doing for random bits of code outside serious hot spots, mind you, and it's become quite difficult to guess how a modern processor (e.g. Core 2 x86 or beyond) is going to execute instructions. Profiling with event counters as well as using IACA (Intel's static analyzer) becomes necessary, as does close reading of their optimization reference manual.

There are no comments on this comment yet.