Re:How I Got a 2x Speedup With One Line of Code
by Amadou on Thursday November 14, 2013 @06:21PM
(#6736478)
Now, I didn't just "know" to prefetch the PyObject three indices forward in the array. I arrived at this value through experimentation.
There is a good chance that 3 is specific to the hardware you tested on. Different systems will have different memory latencies (and NUMA systems can make it even more complicated). It isn't likely that 3 will turn into a pathological case on any other hardware, but it may well end up being less optimal than say 2 or 4.
There is a good chance that 3 is specific to the hardware you tested on. Different systems will have different memory latencies (and NUMA systems can make it even more complicated). It isn't likely that 3 will turn into a pathological case on any other hardware, but it may well end up being less optimal than say 2 or 4.