This is a binary-size optimization, which (at this commit) reduces es' total binary size by about 10%. The improvement scales with the size of initial.es.
This is a very simple way to go about this - I suspect there's a clever way to do it more manually so that it's either faster or more effective, but I'm not smart enough to do that.
The memory sharing here strongly depends on the fact that the data structures in initial.c are static. If any of the data here could move, this would be completely unsound.
This is a binary-size optimization, which (at this commit) reduces es' total binary size by about 10%. The improvement scales with the size of initial.es.
This is a very simple way to go about this - I suspect there's a clever way to do it more manually so that it's either faster or more effective, but I'm not smart enough to do that.
The memory sharing here strongly depends on the fact that the data structures in initial.c are static. If any of the data here could move, this would be completely unsound.