I write a lot of c/c++ for work. I'm also doing some embedded firmware development for GPS as a hobby.
Most things I write I don't need to do low level optimizations. But where I cringe is when I implement somethings from a paper (most recent example fuzzy cmeans) .... the math describes it as O(n*c^2) n being samples c being classes. If you look carefully you can reduce it to O(n*c). This is more important than any low level optimization, other than I/O. I want to have to worry less if a sparse array would be better, and more about the algorithm design as a whole. I want a language where I see the forest and dig down for the trees.
I see lots of bad code in the name of being "efficient". Usually it's not even correct. I'd much rather trust the compiler than most programmers I've met.
High Level Optimizations
I write a lot of c/c++ for work. I'm also doing some embedded firmware development for GPS as a hobby.
Most things I write I don't need to do low level optimizations. But where I cringe is when I implement somethings from a paper (most recent example fuzzy cmeans) .... the math describes it as O(n*c^2) n being samples c being classes. If you look carefully you can reduce it to O(n*c). This is more important than any low level optimization, other than I/O. I want to have to worry less if a sparse array would be better, and more about the algorithm design as a whole. I want a language where I see the forest and dig down for the trees.
I see lots of bad code in the name of being "efficient". Usually it's not even correct. I'd much rather trust the compiler than most programmers I've met.