2 ms·
I don't agree. > but all bets are off when next generation of hardware comes out the sentinel trick reduces the number of checks, so should be independent of
by tempguy9999 7y ago
I don't agree.
> but all bets are off when next generation of hardware comes out
the sentinel trick reduces the number of checks, so should be independent of hardware.
> and a thousand man-hours spent on compiler/optimizer
I can't see a conventional compiler ever automatically doing the sentinel trick as it relies on knowing at least 1. whether multithreading will be happening 2. the size of the array, as the trick's likely increasingly pointless as it outgrows the cache, and possibly other stuff I can't think of.
I might also disagree on making things parallel - cache aware code can bring significant speedups on single threads so that first, then parallise.
disclaimer: I'm not Knuth/Terje Mathisen/Hennesy or Patterson.