Created
September 14, 2017 17:35
-
-
Save quells/95e7ed235abd98dae64a2cef0ea16b0a to your computer and use it in GitHub Desktop.
Javascript Performance Notes
This file contains 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
2.4 ns per bit shift | |
6.3 ns per multiply by 2 | |
25 ns per == comparison | |
2 ns per === comparison | |
45 ns per parseInt | |
2 ns per Math.floor | |
// both work as array indices | |
32 ns per indexOf (scales with length of array) | |
2 ns per object property lookup (does not scale with number of entries) | |
// memory use characteristics not investigated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment