bitpit
bitpit copied to clipboard
PABLO: simplify 2:1 balance
I've rewritten some functions to reduce code duplication. The refactoring removed 1300 lines of code.
There are also some performance improvements. The biggest one is related to the last commit. After the latest code refactoring, it is no more necessary to relay the AUX bit for 2:1 balance. Moreover, that bit was not properly reset and 2:1 balance was check on many more octants than actually needed. This leads to a speed improvement of 25x for the function that perform load balance. All tests pass, however a thorough code review and some more test are needed to make sure the changes are fine.
Original profile of localBalance:
Updated profile of localBalance: