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 with key = xs[idx * 2 + 0], val = xs[idx * 2 + 1] and avoid O(n) array allocations.
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.