News for hackers. Stuff that matters.
Re:The Death of Optimizing Compilers by sitkack on Saturday March 14, 2015 @03:35PM (#9203883)
Isn't what you want is a way for the compiler to find the fast encoding? http://en.wikipedia.org/wiki/Superoptimization

It would be interesting to have an EDSL for representing compiler optimizations that could be tweaked on a per program basis.

While we are at it, maybe swapping out cache associativity, write back semantics and the branch predictor.

Re:The Death of Optimizing Compilers by nkurz on Saturday March 14, 2015 @05:25PM (#9204223)
Yes, that would be great, but I've yet to find a superoptimizer that lives up to its claims: https://news.ycombinator.com/item?id=5509254 Possibly the gap between predicted and actual performance is just too large? But CPU-internal performance monitors are sufficiently advanced that it seems reasonable that one could check actual performance rather than relying on flawed heuristics.

One application I'm thinking about right now is how to optimize "interpolative coding", which is a very tight way of compressing inverted indexes (better than Golomb/Rice/Elias), but so far very slow. It's not immediately obvious how vectorization can make it faster, but possibly some use of the BMI instructions should help, perhaps combined with a big lookup table. It's hard even to get close enough to the right form of solution that a superoptimizer can make headway.

Re:The Death of Optimizing Compilers by sitkack on Saturday March 14, 2015 @07:47PM (#9204702)
Cool application. I had read about FM-Indexes a little bit, I find succinct data structures fascinating. Reading up on the new BMI instructions [-1] and "interpolative coding".

I was wondering if something like, "ISDL: An Instruction Set Description Language for Retargetability" [0] would help? It would be fun to create a combinatoric instruction sequencer and then run them all in an attempt to find some sort of probabilistic heuristic about instruction costs and efficiencies. Something like FFTW, but it analyzes then entire universe of possibilities. Some of the research in synthesizing new instruction sets or operating on compressed instructions might attack the problem from the other side [1].

Stay Fresh!

[-1] https://chessprogramming.wikispaces.com/BMI1

[0] http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.12.8...

[1] http://www.well.com/~cwf/pro/vita.html#Books (look for 'compress')