Re: I need the fastest routine
- From: Dan Downs <ddowns@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 05 Jul 2008 19:22:11 -0400
That looks real cool, but is actually slightly slower than the code
Stig or I posted. I don't quite understand why you think that dividing
the array in 4 will make the code faster. The loop will be shorter, but
checking the loop variable is negligible compared to the comparisons
done in the loop.
I've found loop unrolling to be faster in the past (until the K8 and P4), but current processors minimize the jump in the loop so much that it doesn't really do the trick anymore. I unrolled Clement's original code by 8 and got ~10% improvement on an array of 50000 integers. But Stig's code was much faster, unrolling it gave my nothing extra and some times slower.
testing on a core 2 duo 2.16ghz, d2007
DD
.
- Follow-Ups:
- Re: I need the fastest routine
- From: Rudy Velthuis [TeamB]
- Re: I need the fastest routine
- References:
- I need the fastest routine
- From: Clément Doss
- Re: I need the fastest routine
- From: Nenad Trkulja
- Re: I need the fastest routine
- From: Rudy Velthuis [TeamB]
- I need the fastest routine
- Prev by Date: Re: I need the fastest routine
- Next by Date: Re: I need the fastest routine
- Previous by thread: Re: I need the fastest routine
- Next by thread: Re: I need the fastest routine
- Index(es):
Relevant Pages
|