c++ variance calc is 3.5x faster on my machine