by supernova87a · 3y ago · 0 comments
If you're cycling through all possible numbers and seeing where the output might blow up or go pathological, you probably instead (to be efficient about it) test the far limits of the input number range, and then sample the internal space with an adaptive spacing to see where things are changing and whether it's about to go crazy somewhere. Like divide by zero, subtract 2 small numbers etc.? Or analyze the function to see where subtraction (or whatever operation is applicable here) might misbehave? Rather than spend all your compute equally sampling every possible number.
I'm no expert but it seems to be the same type of problem.
The takeaway might be more: spend time to optimise testing everything, rather than spending time optimising the selection of the subset to test.
Massive caveat of course is that some search spaces are just big, but 32bit space shouldn’t be considered big any more.