davidrmiller / biosim4

Biological evolution simulator
Other
3.1k stars 435 forks source link

Optimize basic types #40

Closed davidrmiller closed 2 years ago

davidrmiller commented 2 years ago

I tested the changes locally by temporarily instrumenting the code to compare the values calculated by the new functions against the old functions during typical simulations. The new functions seem to be exact drop-in functional replacements for the old ones.

I tried to measure the performance improvements by running a simulation using the parameters in the attached config file ( biosim4-test-single-thread-no-video.ini.txt ), with 20 runs each on this branch and on the main branch. On average, this branch ran about 3% faster compared to the main branch.