Skip to content

Don't specialize on coolness

Cédric Belmant requested to merge serenity4/nospecialize-coolness into main

I found we can add a @nospecialize annotation to coolness, and still retain the intent of the benchmarks. It makes it even clearer that we can't just use @nospecialize and have things work: compiling sort still requires inference of specialized coolness methods (even if we say @nospecialize!), triggered by isless.

However, adding a @nospecialize to isless will bust our example, because sort does not call enough methods underneath to trigger lots of indirect compilation. There remains some compilation, but we get a timing difference of ~10x only. The point is, though, that adding @nospecialize absolutely everywhere is generally not possible nor desirable, hence the benefits of using a wrapper.

Also includes a manifest update from the old format to the new format, using 1.9.1.

Merge request reports