Inverse of a SORT is that possible ?
[OT]
Also, my fast processor isn't my fastest one but it is fast compared to the p233mmx I had ten years ago.
[/OT]
I only ran it once and kind of guessed at 20 seconds, thinking about it, it was probably a lot shorter than that.blueznl wrote:I shouldn't do these things, but I actually did a number of runs in the background, debugger on, and doing some forum browsing at the same time... and they average out at 11 seconds hereDerek wrote:Still took 20 seconds on my fast processor.srod wrote:down to the shear speed of today's processors I reckon!Code: Select all
Repeat Until Random(100000000) = 10 Debug "Located 10 !"

Also, my fast processor isn't my fastest one but it is fast compared to the p233mmx I had ten years ago.


[/OT]
It won't, because the numbers aren't actually random.srod wrote:Aye, very nice.
In theory though, this method could lock up, forever in seach of that last 'free' element!![]()
But that's 1 in 100000000. I just require 1 in 100.That fact that it doesn't lock up is quite surprising; down to the shear speed of today's processors I reckon! Kind of like the following which I would expect to run for a long long time before finishing :
Code: Select all
Repeat Until Random(100000000) = 10 Debug "Located 10 !"
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
If people are timing things, then you should agree on an initial seed value, so the results can be properly compared.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
I said: I shouldn't be doing these kind of this.
I regret I did
My apologies, it was not my intention to steal this thread. And if we wanna benchmark, I'm pretty sure this is not the best example to do so 
I regret I did


( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )