Last active
December 23, 2015 01:09
-
-
Save themasch/6558342 to your computer and use it in GitHub Desktop.
can someone explain those results?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var log_2 = Math.log(2); | |
suite('getTagLength', function() { | |
set('mintime', 1000); | |
bench('log(x) / log_2', function() { | |
return ~~(4 - Math.log(0x42 >> 4) / log_2) | |
}) | |
bench('log(x) / log(2)', function() { | |
return ~~(4 - Math.log(0x42 >> 4) / Math.log(2)) | |
}) | |
bench('log(x) / 0.69..', function() { | |
return ~~(4 - Math.log(0x42 >> 4) / 0.6931471805599453) | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var log_2 = Math.log(2); | |
suite('getTagLength', function() { | |
set('mintime', 1000); | |
bench('log(x) / log(2)', function() { | |
return ~~(4 - Math.log(0x42 >> 4) / Math.log(2)) | |
}) | |
bench('log(x) / 0.69..', function() { | |
return ~~(4 - Math.log(0x42 >> 4) / 0.6931471805599453) | |
}) | |
bench('log(x) / log_2', function() { | |
return ~~(4 - Math.log(0x42 >> 4) / log_2) | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var log_2 = Math.log(2); | |
suite('getTagLength', function() { | |
set('mintime', 1000); | |
bench('log(x) / 0.69..', function() { | |
return ~~(4 - Math.log(0x42 >> 4) / 0.6931471805599453) | |
}) | |
bench('log(x) / log(2)', function() { | |
return ~~(4 - Math.log(0x42 >> 4) / Math.log(2)) | |
}) | |
bench('log(x) / log_2', function() { | |
return ~~(4 - Math.log(0x42 >> 4) / log_2) | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% node_modules/.bin/matcha bench/getTagLength.js | |
getTagLength | |
93,236,704 op/s » log(x) / log_2 | |
140,360,674 op/s » log(x) / log(2) | |
139,952,917 op/s » log(x) / 0.69.. | |
Suites: 1 | |
Benches: 3 | |
Elapsed: 6,668.10 ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% node_modules/.bin/matcha bench/getTagLength.js | |
getTagLength | |
183,043,511 op/s » log(x) / log(2) | |
140,520,261 op/s » log(x) / 0.69.. | |
75,107,261 op/s » log(x) / log_2 | |
Suites: 1 | |
Benches: 3 | |
Elapsed: 6,172.77 ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% node_modules/.bin/matcha bench/getTagLength.js | |
getTagLength | |
163,974,921 op/s » log(x) / 0.69.. | |
122,013,489 op/s » log(x) / log(2) | |
64,790,185 op/s » log(x) / log_2 | |
Suites: 1 | |
Benches: 3 | |
Elapsed: 7,422.99 ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment