... and the results for sync_with_stdio(false); are even more impressing (the num_get component is more relevant in this case): 3.3.2 ----- 12.590u 0.040s 0:13.04 96.8% 0+0k 0+0io 215pf+0w 3.4 --- 9.220u 0.000s 0:09.36 98.5% 0+0k 0+0io 204pf+0w 3.4 + patch ----------- 1.780u 0.030s 0:01.89 95.7% 0+0k 0+0io 200pf+0w Paolo.