3 ms·
That's actually the problem he's hinting at near the end as he's trying to make his point about optimizing C. The optimizations he needs to make to the C code
by Cowen 14y ago
That's actually the problem he's hinting at near the end as he's trying to make his point about optimizing C.
The optimizations he needs to make to the C code didn't seem clear to him when he was writing it, but they're very common optimizations for someone with more experience writing in C.
That he made the seemingly-natural optimization in Haskell while not affording C the same luxury is what's hurting his argument.
- cube13 14y ago"Haskell is easier to optimize than C" != "Haskell is faster than C".
- shrughes 14y agoAre you writing that in Haskell or in C? Because in Haskell, you'd want to use the /= operator. In C, you'd want to use strcmp.
- vajrabum 14y agoI think you meant strncmp. Nobody ever wants strcmp, not if they know what it does.
- tedunangst 14y agoYou don't know what you're talking about.
- shrughes 14y agoWe know what it does and it's the right thing to use. You must be thinking of strncpy or some other ennified string.h function.
- dllthomas 14y agoIf Haskell is easier to optimize than C, then it could easily be that there's some amount of programmer effort, for which expending that much effort in Haskell yields a faster program than expending that much effort in C. If that amount of effort is in the range of effort most people are able to expend on a class of projects, then Haskell is faster than C for those projects. It may even be that those are most projects. It is, of course, not the case that Haskell is faster than C with arbitrary effort expended tuning to the specific hardware - no one is claiming that.