mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-09 16:42:10 +02:00
A large number of JS strings are a single ASCII character. This patch adds a 128-entry cache for those strings to the VM. The cost of the cache is 1536 byte of GC heap (all in same block) + 2304 bytes malloc. This avoids a lot of GC heap allocations, and packing all of these in the same heap block is nice for fragmentation as well.
2.0 KiB
2.0 KiB