You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update(core): optimize min buffer size and prep iterative LLRB
- Refactored EM_MIN_BUFFER_SIZE from a fixed 16-byte constant to a dynamic
2-word size (2 * sizeof(void*)). This improves memory granularity on
small-word architectures, reducing buffer overhead for small allocations
(e.g., a single int) from 16 bytes to 4/8/16 bytes respectively.
- Introduced EM_MAX_TREE_HEIGHT as a prerequisite for the transition from
recursive to iterative LLRB operations. The constant is derived from a
mathematically tight formula: ((31 * sizeof(void*)) / 2 - 12).
This formula ensures the absolute minimum stack footprint required for
tree rebalancing across different bitnesses:
- 16-bit: 19 slots (38 bytes)
- 32-bit: 50 slots (200 bytes)
- 64-bit: 112 slots (896 bytes)
0 commit comments