Page 1 of 1

Still Faster Than Select-Case

Posted: Thu Mar 23, 2006 1:19 am
by Randy Walker
I wondered, with the notable speed increase in PB, if my alternative strategy was still faster ... and it is. Sample code in original post has been modified for use in version 4.0
http://www.purebasic.fr/english/viewtopic.php?t=17842

Just wanted to emphasize the "average" process time is significantly decreased using alternative code. It should also be noted that in some instances the Select/Case "filtering" method can produce faster results. Advantages all depend on your application.

Try changing values in both "operation.l" loops from "1 To 26" to "20 To 26" (alternative code is much faster)

Now try changing values in both "operation.l" loops from "1 To 26" to "1 To 6" (alternative code is slightly slower)

Overall "average" is always faster using the alternative code.