3 ms·
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
by Amadou 13y ago
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.