Hacker News new | past | comments | ask | show | jobs | submit login

I think your point around abstractions could be more nuanced. The wrong abstractions can be deleterious to performance, thoughtfully chosen ones can actually be beneficial. Every programming language is several layers of abstraction above the hardware it runs on, which gives the compiler opportunities for optimization, or even the superscalar CPU opportunities for parallelization / reordering. And so on.



I've yet to see a compiler that can beat a human hand-optimizing. It's true that for zero effort the compiler can usually do better but if you really care about performance you need to get around those abstractions. I worked on a wavelet video decoder, after a while we had a pretty optimized C code that used SSE intrinsics for large portions of the decode. Some clever guy spent 3 months and rewrote the entire decoder in assembly. It involved careful data layout and optimizing the instruction sequences. It ran more than twice as fast than our hand optimized C code. Same algorithm, input and output.




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

Search: