3 ms·
Evolving Faster Haskell Programs (now with LLVM)
- zokier 17y agoThe article seems to ignore code size completely, which seems to matter in real world apps. See: http://news.ycombinator.com/item?id=841874 http://news.ycombinator.com/item?id=841874
- tumult 17y agoHow is this relevant?
- eru 17y agoFrom the article: "Computing fitness The programs we want to improve have to report their fitness. To do this I’ll use criterion’s timing function, wrapping up the code we actually want to optimize in some measurement functions. This will just report total wall clock running time for the code under analysis." They only care about speed. And if code size turns out to have an impact on speed, it won't be ignored by this metric.
- yummyfajitas 17y agoThe article does ignore it, and doesn't claim to do otherwise. However, it would be trivial to modify their algorithms to improve code size. Just solve argmin running_time(prog) + alpha * code_size(prog) instead of argmin running_time(prog) Here, alpha is a parameter representing how much you care about code size. I.e., if alpha = 1 sec / 1mb, then you will accept code which is 0.99 seconds slower if it shaves 1mb off the code size, but not code which is 1.01 seconds slower.