-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raw mode? #17
Comments
That makes |
I was thinking that the flat array could go all the way to the user in js land, i.e. no need to unflatten. This would of course need a new api. Would help a bit in our use cases. |
Related: are you working with binary data? If so, I've been thinking about an entirely different approach, where we allocate one buffer and slice it up in JS. But that would not improve perf if you're working with string data (which includes the |
I'm currently working with |
Adds option for a faster "flat" return format. Refs: Level#17
Ok, now I have 'string' encoding but the optimization is still just as relevant. |
Another alternative would be to get keys and values in separate arrays? i.e. |
In order to get key + value we use entries which are an array of
[key,val]
. However, allocating an array for each key value pair is slow. Would be nice if we could somehow return a flattened array withkey = xs[idx * 2 + 0], val = xs[idx * 2 + 1]
and avoid O(n) array allocations.The text was updated successfully, but these errors were encountered: