And just to be fair to C++: g++ -O2 -m32 [VIRT: 94MB, RES: 92MB] real 0m24.567s user 0m24.500s sys 0m0.060s