Some optimizations
@nicolas.bouche, I had a quick look at the slowest parts, and with these changes on the test case, the time goes from ~7.5s to 6.2s
@nicolas.bouche, I had a quick look at the slowest parts, and with these changes on the test case, the time goes from ~7.5s to 6.2s