|
|
|
|
|
by cma
434 days ago
|
|
How big is the pointed to small integer? With alignment etc. I'm seeing some stuff saying 256 of them would fill an 8KB L1. Plus other stuff for the interpreter might overfill it. Sorted that would be less of an issue. Larger range one being slower unsorted yes makes sense because of allocation order no longer matching the iteration order. |
|
Anyway, there is no need to have 256 integers, just 2 is enough. When I try that, the results are similar: 17.5 ms (unsorted) / 12.5 ms (sorted)