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
{{ message }}
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.
what puzzles me is:
why are mappings always decoded into dense arrays
and not into sparse arrays or objects or maps (on demand)?
objects or maps would make 'lookup by column ID' much faster
since the column ID would be used as key
currently we must use some search algorithm (binary search, etc)
to find a segment by its column ID
the only problem i see is the (space and time) overhead of objects / maps
but is it worth .. ?
seems there are two situations:
= initial cost vs running costs
if you need some code to look at
edit: or store mappings as
new Map()
with two-dimensional keys[line, column]
my intuition says:
using sparse array, we delegate optimizations to the javascript implementation
The text was updated successfully, but these errors were encountered: