Skip to content

Conversation

@Juneezee
Copy link
Contributor

@Juneezee Juneezee commented Jan 1, 2025

We upgraded our minimum Go version in PR #39, which allows us to use the math/rand/v2 package, a more 'correct' implementation compared to math/rand.

One of your papers was mentioned in the blog post: https://go.dev/blog/randv2 😉

In 2018, Daniel Lemire found an algorithm that avoids the divisions nearly all the time (see also his 2019 blog post). In math/rand, adopting Lemire’s algorithm would make Intn(1000) 20-30% faster, but we can’t: the faster algorithm generates different values than the standard conversion, breaking repeatability.

We upgraded our minimum Go version in PR
#39, so we can use the
`math/rand/v2` package too.

Reference: https://go.dev/blog/randv2
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@lemire
Copy link
Member

lemire commented Jan 1, 2025

Nice. Thanks.

@lemire lemire merged commit 51abaa4 into FastFilter:master Jan 1, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants