Another test simulating mining, infinite possibilities and solutions.
your method does not guarantee a 100% match. the algorithm does not iterate hashes inside subblocks starting from matching the first bits to the block boundary. with a difficult of 16 bits (as in the example) for some reason you are sure that the prefix will not be repeated in less than 5000 steps, and this is not a correct assumption. two prefixes can go either one after another or not repeat for a large number of iterations. If you are unlucky, you will go through the entire 68th range and will not find the desired hash.
lol, Do you know what probabilistic means? Did you even touch the script? Clearly, both achieve the objective 100% of the time.
Simulation 999:
Sequential: Checks = 47447 | Time = 1.0510s |
Success = True Prefix: Checks = 55398 | Time = 1.9224s |
Success = True Winner: Sequential
Simulation 1000:
Sequential: Checks = 4381 | Time = 0.3199s |
Success = True Prefix: Checks = 3008 | Time = 0.2589s |
Success = True