[Bench!][Mir] +54%..+185% performance boost for Mersenne Twister.
Ilya Yaroshenko via Digitalmars-d
digitalmars-d at puremagic.com
Wed Dec 14 03:10:36 PST 2016
On Wednesday, 14 December 2016 at 00:18:06 UTC, Joseph Rushton
Wakeling wrote:
> Cool. Last question: IIUC you use the private `_z` parameter
> as a cache for the most recent `data[index]` value (and AFAICT
> that's the only use it has). Is there a good reason for doing
> this, rather than just setting `z = data[index]` inside
> `opCall` (where `z` is the local parameter inside the method)?
Because memory access locality. z is always hot.
More information about the Digitalmars-d
mailing list