Hintzelab / MABE

Modular Agent Based Evolution Framework
Other
77 stars 24 forks source link

MarkovBrain execution time optimization #311

Closed abernatskiy closed 5 years ago

abernatskiy commented 5 years ago

In the vectorToBitToInt utility function a temporary container in which the node addresses were stored in appropriate order is replaced by iterating over the original container in appropriate direction. Memory reallocation is thus avoided.

This function is called at every call of DeterministcGate::update(). In the codes that rely heavily on MarkovBrains' deterministic gate, this optimization cuts execution time approximately by a quarter.

modified:   Utilities/Utilities.h