Last active
January 2, 2021 15:16
-
-
Save kriszyp/12f1598b3be35ba4d2d7ce0276bd5535 to your computer and use it in GitHub Desktop.
String functions
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
Function | Characters | Time | |
---|---|---|---|
Buffer.toString | 3 | 180ns | |
Buffer.toString | 10 | 200ns | |
Buffer.toString | 2000 | 500ns | |
Buffer.toString('latin1') | 2000 | 415ns | |
TextDecoder.decode | 10 | 1700ns | |
String.fromCharCode(...) | 3 | 16ns | |
String.fromCharCode(...) | 10 | 46ns | |
String.fromCharCode(...) | 2000 | 4300ns | |
String.fromCharCode.apply(array) | 3 | 29ns | |
String.fromCharCode.apply(array) | 10 | 70ns | |
String.fromCharCode.apply(array) | 2000 | 4800ns | |
String.fromCharCode.apply(buffer) | 10 | 160ns | |
String.slice | any | 3ns |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment