By: hobold (hobold.delete@this.vectorizer.org), March 27, 2022 2:11 am
Room: Moderated Discussions
Jörn Engel (joern.delete@this.purestorage.com) on March 26, 2022 2:14 pm wrote:
> hobold (hobold.delete@this.vectorizer.org) on March 26, 2022 10:32 am wrote:
[...]
> > Sounds like moving "Counter * LargeOddScaleFactor" from the callee to the caller. Is that really a win?
>
> If you're in the game of creating the fastest high-quality PRNG, then yes. They are
> so fast that turning one multiplication into an addition removes a substantial part
> of the cost.
Ah I see, we are moving from "Counter * LargeOddScaleFactor" to "Counter += LargeOddScaleFactor" ... but then "Counter" is indeed an explicitly maintained state. Hmm. Could sometimes be a win, I guess.
> hobold (hobold.delete@this.vectorizer.org) on March 26, 2022 10:32 am wrote:
[...]
> > Sounds like moving "Counter * LargeOddScaleFactor" from the callee to the caller. Is that really a win?
>
> If you're in the game of creating the fastest high-quality PRNG, then yes. They are
> so fast that turning one multiplication into an addition removes a substantial part
> of the cost.
Ah I see, we are moving from "Counter * LargeOddScaleFactor" to "Counter += LargeOddScaleFactor" ... but then "Counter" is indeed an explicitly maintained state. Hmm. Could sometimes be a win, I guess.