Download pool/shard010/JavaScript/0062751_test-string-scan-nonascii.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard010/JavaScript/0062751_test-string-scan-nonascii.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard010/JavaScript/0062751_test-string-scan-nonascii.js
-
curl -L -o 0062751_test-string-scan-nonascii.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard010/JavaScript/0062751_test-string-scan-nonascii.js
1.14 kB
| function test() { | |
| var str = []; | |
| var i; | |
| for (i = 0; i < 1024; i++) { | |
| str.push(String.fromCharCode(i & 0xffff)); | |
| } | |
| str = str.join(''); | |
| /* Because this testcase is not about interning, intern the substrings | |
| * to avoid string table traffic in this particular test. | |
| */ | |
| var dummy = [ | |
| str.charCodeAt(0), | |
| str.charCodeAt(1023), | |
| str.charCodeAt(100), | |
| str.charCodeAt(200), | |
| str.charCodeAt(300), | |
| str.charCodeAt(400), | |
| str.charCodeAt(900), | |
| str.charCodeAt(800), | |
| str.charCodeAt(700), | |
| str.charCodeAt(600), | |
| str.charCodeAt(500) | |
| ]; | |
| for (i = 0; i < 1e6; i++) { | |
| void str.charCodeAt(0); | |
| void str.charCodeAt(1023); | |
| void str.charCodeAt(100); | |
| void str.charCodeAt(200); | |
| void str.charCodeAt(300); | |
| void str.charCodeAt(400); | |
| void str.charCodeAt(900); | |
| void str.charCodeAt(800); | |
| void str.charCodeAt(700); | |
| void str.charCodeAt(600); | |
| void str.charCodeAt(500); | |
| } | |
| } | |
| try { | |
| test(); | |
| } catch (e) { | |
| print(e.stack || e); | |
| throw e; | |
| } | |