tristanls/k-bucket

performance improvements in determineNode

Closed this issue · 1 comments

Hi,

while asking question on stack overflow,
i received a bunch of suggestions to improve the code efficiency in KBucket.prototype._determineNode

Its mostly about the bit manipulation.

I can t tell myself if it is correct (beyond the existing test).

Here is the link https://stackoverflow.com/a/45034412/4466350

hth!

Agreed, code with bitwise shifts is more cleaner. PR is welcome.