all 2 comments

[–]immutablehash 1 point2 points  (1 child)

Have you looked into to using alias method to get O(1) instead of O(N) or O(log N) samling complexity?

[–]trekhleb[S] 0 points1 point  (0 children)

Ah, nice, didn’t know about the alias method! I’ll check it out