4 ms·
How about just giving up on automatic optimization? I love the approach taken by http://halide-lang.org/ http://halide-lang.org/. The programmer writes code, bu
by modeless 12y ago
How about just giving up on automatic optimization? I love the approach taken by http://halide-lang.org/ http://halide-lang.org/. The programmer writes code, but then instead of having a compiler do the optimizations automatically, the programmer also explicitly specifies the optimizations to perform!
The advantage is that changing the optimizations cannot affect the correctness of the algorithm. So you get to write your algorithm once, verify its correctness, and then try drastically changing data layout, order of computations, parallelization, etc, as freely as you want. You can even change the optimizations you're using to match the data you're processing, so you can do much better than an optimizing compiler could do without profile-guided optimization.
Edit: After looking more closely at the presentation, I think Halide is essentially the realization of the hypothetical language described in the last few slides. Somebody should tell DJB about it!
- Joky 12y agoHalide is quite domain specific though, it won't help you to create a new database system for instance, or help you on your hadoop algorithm.
- andrewflnr 12y agoGP suggested using the same approach as Halide, not Halide itself. Obviously you would first need to apply it to a general-purpose language.