7 comments

[ 2.1 ms ] story [ 35.0 ms ] thread
Really cool paper.

I've been playing with a superoptimizer of my own creation (not yet available, still too half-assed and special-casey to inflict on the public) for generating SIMD code and the experience of seeing sophisticated code sequences emerge from "nothing" is eerie. It's early days for program synthesis, but we'll be seeing more of this.

I've got quite a lot of hope that a "sufficiently smart compiler" is not a pipe dream, just an idea well in advance of its time.

I think eventually we'll be able to describe data structures and algorithms in very high level languages in an architecturally neutral way and spit out near optimal code for the desired parameters.

Although I wouldn't be surprised to learn it does happen, but not in my lifetime.

I think in that case you would be very surprised it does happen.
There is some work on automatically generating data structure implementations from high-level specifications: https://cozy.uwplse.org/
That's pretty cool. I'm going to have a play, it could be very helpful.

I have implemented some variants of HAMT and it gets pretty frustrating implementing the same algorithms over and over again for sightly different use cases.

In memory, lazy loading and eager nodes serialized to disk with sync and async APIs, the ability to diff between the above. And sets and map versions.

If you had true zero cost abstraction you could build pieces that can be bolted together to achieve all of that quite elegantly. But an attempt in mainstream languages means losing one if not two orders of magnitude of performance.

This reminds me of the relational interpreters Will Byrd and company build in minikanren. (See barliman) Very cool stuff! I love relational programming. Relation interpreting still blows my mind.