|
-
Jan 17th, 2011, 10:17 AM
#33
Re: Can you do it faster??
Yes, roughly twice faster.
However that part of the code:
If intCounter / lngGuessCount = Int(intCounter / lngGuessCount) Then
Could also be dealt this way:
If (intCounter Mod lngGuessCount) = 0 Then
I think it should be faster, I don't bother to test.
Also if you used a value that is a multiple of 2 then you could use And, ie. in case lngGuessCount = 1024:
If (intCounter And (lngGuessCount - 1)) = 0 Then
It would trigger every 1024th, because 1023 would match all the lower bits. But only works with multiple of 2 (4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 etc.) – and this would certainly be the fastest.
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
|