This commit improves a bit the performances
in the same spirit as b91ad83