I think there is definitely something not quite right.
One thing I notice is that the line:
sample.push_back(get_clock() - base_clock);
Is being timed.
Which could potentially access a new memory page I think.
In pin_thread you have _MSVC_VER instead of _MSC_VER
Hacking up std::vector and adding a push_back_reserved that does no
bounds checks I get consistently very strange timings.
(Code included at the bottom to make it obvious that the latter should
be no slower).
X std::vector::push_back
0 0
100 765.360000
200 1537.260000
400 3037.950000
800 6008.280000
1600 11905.150000
3200 23950.320000
6400 48064.600000
12800 96178.470000
25600 190637.270000
51200 379025.420000
102400 757784.880000
204800 1514584.120000
409600 3026480.680000
819200 6050654.130000
X std::vector::push_back_reserved
0 0
100 938.090000
200 1936.380000
400 3704.400000
800 7274.170000
1600 14307.310000
3200 28550.140000
6400 56835.310000
12800 113579.430000
25600 226906.070000
51200 453802.040000
102400 911835.760000
204800 1819723.520000
409600 3639619.650000
819200 7281897.560000
My simpler, and I'm sure in many ways inferior benchmark, shows much
more believable results.
http://codepad.org/SBZ4rbqo
Running 1 test case...
std::vector