WIP: Reuse precomputed int closures for any compatible closure.
Reuse precomputed int closures for any compatible closure.
We used to replace dynamic closures for Int with static preallocated ones
if they fall in a common value range.
This patch expands this scheme to any closure of compatible tag/layout.
On nofib compile times improve by -1.7% while runtime improved by -0.7%.
This implements #17495.
TODO:
-
Documentation -
Creating a specific type for precomputed closures so that those closures won't show up as Int in eg heap-view -
remove now redundant precomputed closures -
Code cleanup
Edited by Andreas Klebinger