Re: I need the fastest routine



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
.



Relevant Pages

  • RE: Error 3021
    ... Create proto-file names using the selected job names and storre to an array ... Save and close the document and repeat the loop ... Dim strJobsAs String, strDocsAs String, varValsAs _ ...
    (microsoft.public.access.modulesdaovba)
  • RE: Error 3021
    ... Kevin Backmann ... Create proto-file names using the selected job names and storre to an array ... Save and close the document and repeat the loop ... Dim strJobsAs String, strDocsAs String, varValsAs _ ...
    (microsoft.public.access.modulesdaovba)
  • RE: Error 3021
    ... Create proto-file names using the selected job names and storre to an array ... Save and close the document and repeat the loop ... Dim strJobsAs String, strDocsAs String, varValsAs _ ...
    (microsoft.public.access.modulesdaovba)
  • Re: Displaying a large amount of data quickly (VB6)
    ... >>> involving a loop of VB code would be too slow. ... but I'd sure be interested to know if that StringBuilder ... Array elements: 25000 ... Array construction: 17 ...
    (microsoft.public.vb.controls)
  • RE: Error 3021
    ... Create proto-file names using the selected job names and storre to an array ... Save and close the document and repeat the loop ... Dim strJobsAs String, strDocsAs String, varValsAs _ ...
    (microsoft.public.access.modulesdaovba)