Modified permuteExistingNumbers(), moving the isValidSurrealNumber() check into the symbol-permutation loop.
Based on profiling, such a large quantity of invalid numbers was being
generated that data operations were sucking up a significant portion of total
program runtime.
Benchmarking command:
time ./ch1-breeding-numbers -generations 13 -silent
go tool pprof ch1-breeding-numbers 13gen-memprofile-gen12.mprof
top25
Before:
38.303u 2.233s 0:23.41 173.1% 0+0k 40+62io 354pf+0w
Showing nodes accounting for 2.29GB, 100% of 2.29GB total
After:
23.435u 0.887s 0:19.54 124.4% 0+0k 40+52io 347pf+0w
Showing nodes accounting for 1.12GB, 99.55% of 1.13GB total