Download pool/shard004/JavaScript/0025180_less-than.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 556 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard004/JavaScript/0025180_less-than.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard004/JavaScript/0025180_less-than.js
-
curl -L -o 0025180_less-than.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard004/JavaScript/0025180_less-than.js
556 Bytes
| var Benchmark = require('benchmark') | |
| var slice = [].slice | |
| var suite = new Benchmark.Suite | |
| function lessThan(a, b) { | |
| return a < b | |
| } | |
| suite.add({ name: 'integers', fn: function () { lessThan(1, 2) } }) | |
| suite.add({ name: 'infinity', fn: function () { lessThan(1, Infinity) } }) | |
| suite.add({ name: 'int-max', fn: function () { lessThan(1, 0x7fffffff) } }) | |
| suite.on('cycle', function(event) { | |
| console.log(String(event.target)); | |
| }) | |
| suite.on('complete', function() { | |
| console.log('Fastest is ' + this.filter('fastest').map('name')); | |
| }) | |
| suite.run() | |