mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-08 08:02:14 +02:00
Bytecode source map entries are always added in order of increasing bytecode offset, and lookups only happen during error handling (a cold path). This makes a sorted vector with binary search a better fit than a hash map. This change reduces memory overhead and speeds up bytecode generation by avoiding hash table operations during compilation. Lookups remain fast via binary search, and since source_range_at() is only called when generating stack traces, the O(log n) lookup is acceptable.
4.7 KiB
4.7 KiB