davidmoten/hilbert-curve

`HilbertCurve.toIndex(...)` allocates too much memory

normen662 opened this issue · 2 comments

In line

b is allocated with the size of length although if I am not mistaken, length is the number of bits -- not bytes. Sorry if this is incorrect! Just starting with the code...

Very nice catch, thanks! It does look like we should only need approximately length/8 bytes. Should improve benchmarks, we'll see.

Righto, I've fixed that via PR #69. I've released 0.2.3 to Maven Central with the fix, thanks for raising the issue!