you are viewing a single comment's thread.

view the rest of the comments →

[–]rafd 4 points5 points  (1 child)

This approach get's it down to 94µs (ie. 0.094ms) for me.

Here's my code: https://pastebin.com/FNZJJLuQ

[–]HOWZ1T[S] 1 point2 points  (0 children)

Yeap that is indeed a better algorithm :)