|
-
Jun 20th, 2000, 09:41 PM
#13
Fanatic Member
HANG ON
The code doesn't work without the findprimes2 function!
If you look the difference is the "For search = 1 To NoOfPrimes \ 9" line and that is what speeds things up.
The first 1000 primes are called with the find primes function but after that the findprimes2 function is called bacuse that's where the pattern starts.
If you want to do a speed test, copy the findprimes function to the findprimes2 function so they are the same then run a million primes, the difference is very big speed wise.
but I suppose if you only want to check a few thousand it doesn't really matter, just remember both are being called there.
Cheers
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|