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
var n = 5000000; | |
var encodedRid = '%2310%3A23'; // #10:23 | |
console.time('decodeURIComponent 1/2'); | |
for (var i = 0; i < n; i++) { | |
decodeURIComponent(encodedRid); | |
} | |
console.timeEnd('decodeURIComponent 1/2'); |
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
/** | |
* Example on how to get cursor position programatically with JS | |
*/ | |
var stdin = process.stdin; | |
var firstAttempt = true; | |
function callback() { | |
var buf = stdin.read(); |
NewerOlder