Here are the numbers for on ivy bridge CPU:
The output for [1] using the current RTL CompareByte is:
9.001.275.281 cycles:u( +- 0,00% )
28.000.560.462 instructions:u # 3,11 insn per cycle ( +- 0,00% )
2,654735815 seconds time elapsed( +- 0,00% )
The
On 10/23/2017 02:21 AM, Wolf wrote:
On 23/10/17 02:53, Nikolay Nikolov wrote:
FPC trunk supports rdtscp. And if you're using a FPC version that
doesn't support an instruction, you can always hardcode it with 'db'
(make sure you add a comment with the real instruction to keep your
code
Using the code given below as "inner", I measure this:
Current Trunk:
O0 compare-byte-1 : 196065.112 +/- 896.754 cycles/inner [0.5 %CV 1.6 %R]
O1 compare-byte-1 : 196510.158 +/- 577.976 cycles/inner [0.3 %CV 1.1 %R]
O3 compare-byte-1 : 187540.922 +/- 706.167 cycles/inner [0.4 %CV 1.5 %R]
Patch