3 ms·
Ouch. This is on my $2500 i5 mbpro from 2018. $ ./two_or_three N = 1000000000, 953.7 MB starting experiments. two : 53.3 ns two+ : 60.1 ns three: 78.6 n
by nottorp 6y ago
Ouch. This is on my $2500 i5 mbpro from 2018.
$ ./two_or_three
N = 1000000000, 953.7 MB
starting experiments.
two : 53.3 ns
two+ : 60.1 ns
three: 78.6 ns
bogus 1375316400
------
2+ 12% slower than 2
3-wise 47% slower than 2
3-wise 30% slower than 2+
-------
Ratios aside, that's an interesting speed leap when the article gets 9 ms for 2-wise. Mind, the laptop had lots of applications running, i didn't clear it up to do a proper benchmark, but still.