Earlier quoted context omitted.
> Someone really needs to crack simple generic type systems with native levels of performance to get all of this to work. We know how this works, at least in broad theoretical terms. Zero-cost abstractions are quite feasible within a self-contained module/component, but their scope is ultimately limited by ease of building and deployment. Nevertheless the performance impact of having to support high levels of abstrac…
I'm thinking supercompilation might be another part of the equation as long as we're talking extended composition of modules and types whose behavior is totally closed. Having a pipeline that can supercompile when systems are pushed in production even if some compilation time is traded for performance at development (maybe "local" supercompilation for subsystems relevant to a development team?) would be an interestin…
Some have noted that JIT systems perform many of the same things as supercompilation, and it seems reasonable to consider that JIT is part of the equation for optimising performance when systems are pushed to production. We've been doing that for decades now, with increasing sophistication in the details. Profile driven, multiple stages of specialisation and optimisation.
Not quite to the levels of proof systems (and therefore supercompilation as envisioned) yet - there's plenty of room to get better at it - and we need to go there if we want those "zero cost abstractions" across modules that aren't designed for it, often with significant impedance mismatches.