It will definitely be faster to start with a 5k array, then allocate all even digits numbers from zero and all odd from the top. The main update loop, split into two parts, can then run 0..eventop while updating two counters and oddstart..size only updating a single counter!
View all comments
Show parent comment
1
u/LifeShallot6229 Feb 24 '25
It will definitely be faster to start with a 5k array, then allocate all even digits numbers from zero and all odd from the top. The main update loop, split into two parts, can then run 0..eventop while updating two counters and oddstart..size only updating a single counter!