├── .gitignore ├── benchmarks ├── fast-uuid.js ├── nanoid.js ├── shortid.js ├── cuid.js ├── uuid-random.js ├── hyperid.js ├── sodium-uuid.js ├── uuid.js ├── crypto.randomFillSync.js ├── sodium-native.js ├── crypto.randomFill.js ├── crypto.randomBytes.js └── dev-random.js ├── LICENSE ├── package.json ├── bench.js ├── README.md └── results.csv /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /benchmarks/fast-uuid.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const uuid = require('fast-uuid').uuid4 4 | 5 | module.exports = function (suite) { 6 | suite.add('fast-uuid', function () { 7 | uuid() 8 | }, { 9 | leaky: true, 10 | format: 'uuid' 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /benchmarks/nanoid.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const nanoid = require('nanoid') 4 | 5 | module.exports = function (suite) { 6 | suite.add('nanoid', function () { 7 | nanoid() 8 | }, { 9 | format: 'other', 10 | example: nanoid(), 11 | guid: true 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /benchmarks/shortid.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const shortid = require('shortid') 4 | 5 | module.exports = function (suite) { 6 | suite.add('shortid', function () { 7 | shortid() 8 | }, { 9 | leaky: true, 10 | format: 'other', 11 | example: shortid(), 12 | guid: false 13 | }) 14 | } 15 | -------------------------------------------------------------------------------- /benchmarks/cuid.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const cuid = require('cuid') 4 | 5 | module.exports = function (suite) { 6 | suite.add('cuid', function () { 7 | cuid() 8 | }, { 9 | leaky: true, 10 | random: false, 11 | format: 'other', 12 | example: cuid(), 13 | guid: true 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /benchmarks/uuid-random.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const uuid = require('uuid-random') 4 | 5 | module.exports = function (suite) { 6 | const name = 'uuid-random' 7 | 8 | suite.add(name, function () { 9 | uuid() 10 | }, { 11 | format: 'uuid', 12 | cacheSize: 512 13 | }) 14 | 15 | suite.add(name, function () { 16 | uuid.bin().toString('hex') 17 | }, { 18 | format: 'hex', 19 | cacheSize: 512 20 | }) 21 | 22 | suite.add(name, function () { 23 | uuid.bin() 24 | }, { 25 | format: 'buffer', 26 | cacheSize: 512 27 | }) 28 | } 29 | -------------------------------------------------------------------------------- /benchmarks/hyperid.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const hyperid = require('hyperid') 4 | 5 | module.exports = function (suite) { 6 | const name = 'hyperid' 7 | const example = hyperid()() 8 | 9 | suite.add(name, function () { 10 | hyperid()() 11 | }, { 12 | postfix: 'cold start', 13 | leaky: true, 14 | random: false, 15 | format: 'other', 16 | guid: true, 17 | example 18 | }) 19 | 20 | suite.add(name, function () { 21 | this.instance() 22 | }, { 23 | onStart () { 24 | this.instance = hyperid() 25 | }, 26 | postfix: 'normal', 27 | leaky: true, 28 | random: false, 29 | format: 'other', 30 | guid: true, 31 | example 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /benchmarks/sodium-uuid.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const uuid = require('sodium-uuid') 4 | 5 | module.exports = function (suite) { 6 | const name = 'sodium-uuid' 7 | 8 | suite.add(name, function () { 9 | uuid().toString('hex') 10 | }, { 11 | format: 'hex' 12 | }) 13 | 14 | suite.add(name, function () { 15 | uuid(this.buf) 16 | this.buf.toString('hex') 17 | }, { 18 | onStart () { 19 | this.buf = Buffer.alloc(16) 20 | }, 21 | format: 'hex', 22 | reuse: true 23 | }) 24 | 25 | suite.add(name, function () { 26 | uuid() 27 | }, { 28 | format: 'buffer' 29 | }) 30 | 31 | suite.add(name, function () { 32 | uuid(this.buf) 33 | }, { 34 | onStart () { 35 | this.buf = Buffer.alloc(16) 36 | }, 37 | format: 'buffer', 38 | reuse: true 39 | }) 40 | } 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Thomas Watson Steen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uuid-benchmark", 3 | "version": "1.0.0", 4 | "description": "Benchmark of different UUID generation methods", 5 | "main": "bench.js", 6 | "dependencies": { 7 | "benchmark": "^2.1.4", 8 | "csv-stringify": "^3.1.1", 9 | "cuid": "^2.1.1", 10 | "fast-uuid": "^1.0.1", 11 | "hyperid": "^1.4.1", 12 | "markdown-table": "^1.1.2", 13 | "nanoid": "^1.2.0", 14 | "numeral": "^2.0.6", 15 | "shortid": "^2.2.12", 16 | "sodium-native": "^2.2.1", 17 | "sodium-uuid": "^1.3.0", 18 | "uuid": "^3.3.2", 19 | "uuid-random": "^1.0.6" 20 | }, 21 | "devDependencies": {}, 22 | "scripts": { 23 | "test": "echo \"Error: no test specified\" && exit 1", 24 | "bench": "node bench.js" 25 | }, 26 | "repository": { 27 | "type": "git", 28 | "url": "git+https://github.com/watson/uuid-benchmark.git" 29 | }, 30 | "keywords": [ 31 | "uuid", 32 | "random", 33 | "randomnes", 34 | "generator" 35 | ], 36 | "author": "Thomas Watson (https://twitter.com/wa7son)", 37 | "license": "MIT", 38 | "bugs": { 39 | "url": "https://github.com/watson/uuid-benchmark/issues" 40 | }, 41 | "homepage": "https://github.com/watson/uuid-benchmark#readme" 42 | } 43 | -------------------------------------------------------------------------------- /benchmarks/uuid.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = function (suite) { 4 | { 5 | const uuid = require('uuid/v1') 6 | const name = 'uuid/v1' 7 | 8 | suite.add(name, function () { 9 | uuid() 10 | }, { 11 | leaky: true, 12 | random: false, 13 | format: 'uuid' 14 | }) 15 | 16 | suite.add(name, function () { 17 | const buf = Buffer.alloc(16) 18 | uuid(null, buf) 19 | buf.toString('hex') 20 | }, { 21 | leaky: true, 22 | random: false, 23 | format: 'hex' 24 | }) 25 | 26 | suite.add(name, function () { 27 | uuid(null, this.buf) 28 | this.buf.toString('hex') 29 | }, { 30 | onStart () { 31 | this.buf = Buffer.alloc(16) 32 | }, 33 | leaky: true, 34 | random: false, 35 | format: 'hex', 36 | reuse: true 37 | }) 38 | 39 | suite.add(name, function () { 40 | const buf = Buffer.alloc(16) 41 | uuid(null, buf) 42 | }, { 43 | leaky: true, 44 | random: false, 45 | format: 'buffer' 46 | }) 47 | 48 | suite.add(name, function () { 49 | uuid(null, this.buf) 50 | }, { 51 | onStart () { 52 | this.buf = Buffer.alloc(16) 53 | }, 54 | leaky: true, 55 | random: false, 56 | format: 'buffer', 57 | reuse: true 58 | }) 59 | } 60 | 61 | { 62 | const uuid = require('uuid/v4') 63 | const name = 'uuid/v4' 64 | 65 | suite.add(name, function () { 66 | uuid() 67 | }, { 68 | format: 'uuid' 69 | }) 70 | 71 | suite.add(name, function () { 72 | const buf = Buffer.alloc(16) 73 | uuid(null, buf) 74 | buf.toString('hex') 75 | }, { 76 | format: 'hex' 77 | }) 78 | 79 | suite.add(name, function () { 80 | uuid(null, this.buf) 81 | this.buf.toString('hex') 82 | }, { 83 | onStart () { 84 | this.buf = Buffer.alloc(16) 85 | }, 86 | format: 'hex', 87 | reuse: true 88 | }) 89 | 90 | suite.add(name, function () { 91 | const buf = Buffer.alloc(16) 92 | uuid(null, buf) 93 | }, { 94 | format: 'buffer' 95 | }) 96 | 97 | suite.add(name, function () { 98 | uuid(null, this.buf) 99 | }, { 100 | onStart () { 101 | this.buf = Buffer.alloc(16) 102 | }, 103 | format: 'buffer', 104 | reuse: true 105 | }) 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /benchmarks/crypto.randomFillSync.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const crypto = require('crypto') 4 | 5 | module.exports = function (suite) { 6 | const name = 'crypto.randomFillSync' 7 | 8 | suite.add(name, function () { 9 | crypto.randomFillSync(this.buf, 0, 16) 10 | this.buf.toString('hex') 11 | }, { 12 | onStart () { 13 | this.buf = Buffer.alloc(16) 14 | }, 15 | format: 'hex', 16 | reuse: true 17 | }) 18 | 19 | suite.add(name, function () { 20 | crypto.randomFillSync(this.buf, 0, 16) 21 | }, { 22 | onStart () { 23 | this.buf = Buffer.alloc(16) 24 | }, 25 | format: 'buffer', 26 | reuse: true 27 | }) 28 | 29 | for (const cacheSize of suite.cacheSizes) { 30 | suite.add(name, function () { 31 | if (this.offset % cacheSize === 0) { 32 | crypto.randomFillSync(this.cache, 0, cacheSize) 33 | const buf = this.cache.slice(0, 16) 34 | buf.toString('hex') 35 | this.offset = 16 36 | } else { 37 | const buf = this.cache.slice(this.offset, this.offset + 16) 38 | buf.toString('hex') 39 | this.offset += 16 40 | } 41 | }, { 42 | onStart () { 43 | this.offset = 0 44 | this.cache = Buffer.alloc(cacheSize) 45 | }, 46 | format: 'hex', 47 | cacheSize 48 | }) 49 | 50 | suite.add(name, function () { 51 | if (this.offset % cacheSize === 0) { 52 | crypto.randomFillSync(this.cache, 0, cacheSize) 53 | this.cache.copy(this.buf, 0, 0, 16) 54 | this.buf.toString('hex') 55 | this.offset = 16 56 | } else { 57 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 58 | this.buf.toString('hex') 59 | this.offset += 16 60 | } 61 | }, { 62 | onStart () { 63 | this.offset = 0 64 | this.buf = Buffer.alloc(16) 65 | this.cache = Buffer.alloc(cacheSize) 66 | }, 67 | format: 'hex', 68 | reuse: true, 69 | cacheSize 70 | }) 71 | 72 | suite.add(name, function () { 73 | if (this.offset % cacheSize === 0) { 74 | crypto.randomFillSync(this.cache, 0, cacheSize) 75 | this.cache.slice(0, 16) 76 | this.offset = 16 77 | } else { 78 | this.cache.slice(this.offset, this.offset + 16) 79 | this.offset += 16 80 | } 81 | }, { 82 | onStart () { 83 | this.offset = 0 84 | this.cache = Buffer.alloc(cacheSize) 85 | }, 86 | format: 'buffer', 87 | cacheSize 88 | }) 89 | 90 | suite.add(name, function () { 91 | if (this.offset % cacheSize === 0) { 92 | crypto.randomFillSync(this.cache, 0, cacheSize) 93 | this.cache.copy(this.buf, 0, 0, 16) 94 | this.offset = 16 95 | } else { 96 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 97 | this.offset += 16 98 | } 99 | }, { 100 | onStart () { 101 | this.offset = 0 102 | this.buf = Buffer.alloc(16) 103 | this.cache = Buffer.alloc(cacheSize) 104 | }, 105 | format: 'buffer', 106 | reuse: true, 107 | cacheSize 108 | }) 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /benchmarks/sodium-native.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const sodium = require('sodium-native') 4 | 5 | module.exports = function (suite) { 6 | const name = 'sodium-native' 7 | 8 | suite.add(name, function () { 9 | const buf = Buffer.alloc(16) 10 | sodium.randombytes_buf(buf) 11 | buf.toString('hex') 12 | }, { 13 | format: 'hex' 14 | }) 15 | 16 | suite.add(name, function () { 17 | sodium.randombytes_buf(this.buf) 18 | this.buf.toString('hex') 19 | }, { 20 | onStart () { 21 | this.buf = Buffer.alloc(16) 22 | }, 23 | reuse: true, 24 | format: 'hex' 25 | }) 26 | 27 | suite.add(name, function () { 28 | const buf = Buffer.alloc(16) 29 | sodium.randombytes_buf(buf) 30 | }, { 31 | format: 'buffer' 32 | }) 33 | 34 | suite.add(name, function () { 35 | sodium.randombytes_buf(this.buf) 36 | }, { 37 | onStart () { 38 | this.buf = Buffer.alloc(16) 39 | }, 40 | reuse: true, 41 | format: 'buffer' 42 | }) 43 | 44 | for (const cacheSize of suite.cacheSizes) { 45 | suite.add(name, function () { 46 | if (this.offset % cacheSize === 0) { 47 | sodium.randombytes_buf(this.cache) 48 | const buf = this.cache.slice(0, 16) 49 | buf.toString('hex') 50 | this.offset = 16 51 | } else { 52 | const buf = this.cache.slice(this.offset, this.offset + 16) 53 | buf.toString('hex') 54 | this.offset += 16 55 | } 56 | }, { 57 | onStart () { 58 | this.offset = 0 59 | this.cache = Buffer.alloc(cacheSize) 60 | }, 61 | format: 'hex', 62 | cacheSize 63 | }) 64 | 65 | suite.add(name, function () { 66 | if (this.offset % cacheSize === 0) { 67 | sodium.randombytes_buf(this.cache) 68 | this.cache.copy(this.buf, 0, 0, 16) 69 | this.buf.toString('hex') 70 | this.offset = 16 71 | } else { 72 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 73 | this.buf.toString('hex') 74 | this.offset += 16 75 | } 76 | }, { 77 | onStart () { 78 | this.offset = 0 79 | this.buf = Buffer.alloc(16) 80 | this.cache = Buffer.alloc(cacheSize) 81 | }, 82 | reuse: true, 83 | format: 'hex', 84 | cacheSize 85 | }) 86 | 87 | suite.add(name, function () { 88 | if (this.offset % cacheSize === 0) { 89 | sodium.randombytes_buf(this.cache) 90 | this.cache.slice(0, 16) 91 | this.offset = 16 92 | } else { 93 | this.cache.slice(this.offset, this.offset + 16) 94 | this.offset += 16 95 | } 96 | }, { 97 | onStart () { 98 | this.offset = 0 99 | this.cache = Buffer.alloc(cacheSize) 100 | }, 101 | format: 'buffer', 102 | cacheSize 103 | }) 104 | 105 | suite.add(name, function () { 106 | if (this.offset % cacheSize === 0) { 107 | sodium.randombytes_buf(this.cache) 108 | this.cache.copy(this.buf, 0, 0, 16) 109 | this.offset = 16 110 | } else { 111 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 112 | this.offset += 16 113 | } 114 | }, { 115 | onStart () { 116 | this.offset = 0 117 | this.buf = Buffer.alloc(16) 118 | this.cache = Buffer.alloc(cacheSize) 119 | }, 120 | reuse: true, 121 | format: 'buffer', 122 | cacheSize 123 | }) 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /benchmarks/crypto.randomFill.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const crypto = require('crypto') 4 | 5 | module.exports = function (suite) { 6 | const name = 'crypto.randomFill' 7 | 8 | suite.add(name, function (deferred) { 9 | crypto.randomFill(this.buf, 0, 16, (_, buf) => { 10 | buf.toString('hex') 11 | deferred.resolve() 12 | }) 13 | }, { 14 | onStart () { 15 | this.buf = Buffer.alloc(16) 16 | }, 17 | defer: true, 18 | reuse: true, 19 | format: 'hex' 20 | }) 21 | 22 | suite.add(name, function (deferred) { 23 | crypto.randomFill(this.buf, 0, 16, (_, buf) => { 24 | deferred.resolve() 25 | }) 26 | }, { 27 | onStart () { 28 | this.buf = Buffer.alloc(16) 29 | }, 30 | defer: true, 31 | reuse: true, 32 | format: 'buffer' 33 | }) 34 | 35 | for (const cacheSize of suite.cacheSizes) { 36 | suite.add(name, function (deferred) { 37 | if (this.offset % cacheSize === 0) { 38 | crypto.randomFill(this.cache, 0, cacheSize, (_, _buf) => { 39 | this.cache = _buf 40 | const buf = this.cache.slice(0, 16) 41 | buf.toString('hex') 42 | this.offset = 16 43 | deferred.resolve() 44 | }) 45 | } else { 46 | const buf = this.cache.slice(this.offset, this.offset + 16) 47 | buf.toString('hex') 48 | this.offset += 16 49 | process.nextTick(function () { 50 | deferred.resolve() 51 | }) 52 | } 53 | }, { 54 | onStart () { 55 | this.offset = 0 56 | this.cache = Buffer.alloc(cacheSize) 57 | }, 58 | defer: true, 59 | format: 'hex', 60 | cacheSize 61 | }) 62 | 63 | suite.add(name, function (deferred) { 64 | if (this.offset % cacheSize === 0) { 65 | crypto.randomFill(this.cache, 0, cacheSize, (_, buf) => { 66 | this.cache = buf 67 | this.cache.copy(this.buf, 0, 0, 16) 68 | this.buf.toString('hex') 69 | this.offset = 16 70 | deferred.resolve() 71 | }) 72 | } else { 73 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 74 | this.buf.toString('hex') 75 | this.offset += 16 76 | process.nextTick(function () { 77 | deferred.resolve() 78 | }) 79 | } 80 | }, { 81 | onStart () { 82 | this.offset = 0 83 | this.buf = Buffer.alloc(16) 84 | this.cache = Buffer.alloc(cacheSize) 85 | }, 86 | defer: true, 87 | format: 'hex', 88 | reuse: true, 89 | cacheSize 90 | }) 91 | 92 | suite.add(name, function (deferred) { 93 | if (this.offset % cacheSize === 0) { 94 | crypto.randomFill(this.cache, 0, cacheSize, (_, _buf) => { 95 | this.cache = _buf 96 | this.cache.slice(0, 16) 97 | this.offset = 16 98 | deferred.resolve() 99 | }) 100 | } else { 101 | this.cache.slice(this.offset, this.offset + 16) 102 | this.offset += 16 103 | process.nextTick(function () { 104 | deferred.resolve() 105 | }) 106 | } 107 | }, { 108 | onStart () { 109 | this.offset = 0 110 | this.cache = Buffer.alloc(cacheSize) 111 | }, 112 | defer: true, 113 | format: 'buffer', 114 | cacheSize 115 | }) 116 | 117 | suite.add(name, function (deferred) { 118 | if (this.offset % cacheSize === 0) { 119 | crypto.randomFill(this.cache, 0, cacheSize, (_, buf) => { 120 | this.cache = buf 121 | this.cache.copy(this.buf, 0, 0, 16) 122 | this.offset = 16 123 | deferred.resolve() 124 | }) 125 | } else { 126 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 127 | this.offset += 16 128 | process.nextTick(function () { 129 | deferred.resolve() 130 | }) 131 | } 132 | }, { 133 | onStart () { 134 | this.offset = 0 135 | this.buf = Buffer.alloc(16) 136 | this.cache = Buffer.alloc(cacheSize) 137 | }, 138 | defer: true, 139 | format: 'buffer', 140 | reuse: true, 141 | cacheSize 142 | }) 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /bench.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fs = require('fs') 4 | const {Suite} = require('benchmark') 5 | const toCsv = require('csv-stringify') 6 | const table = require('markdown-table') 7 | const numeral = require('numeral') 8 | 9 | const suite = new Suite() 10 | 11 | suite.cacheSizes = [16 ** 2, 16 ** 3, 16 ** 4] 12 | 13 | const origAdd = suite.add 14 | suite.add = function (...args) { 15 | // setup default property values on the Benchmark object 16 | // TODO: This will not work if there's no options object 17 | for (let i = 0; i < 3; i++) { 18 | if (typeof args[i] === 'object') { 19 | args[i] = Object.assign({ 20 | guid: true, 21 | leaky: false, 22 | random: true, 23 | reuse: false 24 | }, args[i]) 25 | break 26 | } 27 | } 28 | return origAdd.apply(this, args) 29 | } 30 | 31 | const single = process.argv[2] 32 | 33 | if (single) { 34 | require(single)(suite) 35 | } else { 36 | // uuid 37 | require('./benchmarks/uuid')(suite) 38 | require('./benchmarks/fast-uuid')(suite) 39 | require('./benchmarks/uuid-random')(suite) 40 | require('./benchmarks/sodium-uuid')(suite) 41 | require('./benchmarks/sodium-native')(suite) 42 | require('./benchmarks/crypto.randomBytes')(suite) 43 | require('./benchmarks/crypto.randomFillSync')(suite) 44 | require('./benchmarks/crypto.randomFill')(suite) 45 | require('./benchmarks/dev-random')(suite) 46 | 47 | // other 48 | require('./benchmarks/hyperid')(suite) 49 | require('./benchmarks/cuid')(suite) 50 | require('./benchmarks/shortid')(suite) 51 | require('./benchmarks/nanoid')(suite) 52 | } 53 | 54 | suite 55 | .on('cycle', function (event) { 56 | const t = event.target 57 | console.log(`${desc(t)} x ${numeral(t.hz).format('0,0')} ops/sec ±${t.stats.rme.toFixed(2)}% (${t.stats.sample.length} runs sampled)`) 58 | }) 59 | .on('complete', function () { 60 | console.log('Fastest is ' + desc(this.filter('fastest')[0])) 61 | 62 | // if running just a single benchmark, skip updating result files 63 | if (!single) { 64 | updateReadme() 65 | updateCsv() 66 | } 67 | }) 68 | .run() 69 | 70 | function updateReadme () { 71 | const path = 'README.md' 72 | const marker = '\n' 73 | const parts = fs.readFileSync(path, 'utf8').split(marker) 74 | parts[1] = uuidTable() 75 | parts[3] = otherTable() 76 | fs.writeFileSync(path, parts.join(marker)) 77 | } 78 | 79 | function updateCsv () { 80 | csv(function (err, output) { 81 | if (err) throw err 82 | fs.writeFileSync('results.csv', output) 83 | }) 84 | } 85 | 86 | function uuidTable () { 87 | const arr = suite.filter(function (b) { 88 | return b.format !== 'other' 89 | }).map(function (b) { 90 | return [ 91 | method(b), 92 | features(b), 93 | check(b.reuse), 94 | check(!b.defer), 95 | b.cacheSize || '', 96 | b.format, 97 | numeral(b.hz).format('0,0'), 98 | `±${b.stats.rme.toFixed(2)}%`, 99 | b.stats.sample.length 100 | ] 101 | }) 102 | 103 | arr.unshift([ 104 | 'Method', 105 | 'Features', 106 | 'Re-use', 107 | 'Sync', 108 | 'Cache', 109 | 'Format', 110 | 'Ops/sec', 111 | 'RME', 112 | 'Samples' 113 | ]) 114 | 115 | return table(arr, {align: ['l', 'l', 'c', 'c', 'r', 'l', 'r', 'l', 'r']}) + '\n' 116 | } 117 | 118 | function otherTable () { 119 | const arr = suite.filter(function (b) { 120 | return b.format === 'other' 121 | }).map(function (b) { 122 | return [ 123 | method(b), 124 | features(b), 125 | check(b.reuse), 126 | check(!b.defer), 127 | b.cacheSize || '', 128 | numeral(b.hz).format('0,0'), 129 | `±${b.stats.rme.toFixed(2)}%`, 130 | b.stats.sample.length, 131 | `${b.example}` 132 | ] 133 | }) 134 | 135 | arr.unshift([ 136 | 'Method', 137 | 'Features', 138 | 'Re-use', 139 | 'Sync', 140 | 'Cache', 141 | 'Ops/sec', 142 | 'RME', 143 | 'Samples', 144 | 'Example' 145 | ]) 146 | 147 | return table(arr, {align: ['l', 'l', 'c', 'c', 'r', 'r', 'l', 'r', 'l']}) + '\n' 148 | } 149 | 150 | function csv (cb) { 151 | const arr = suite.map(function (b) { 152 | return [ 153 | fullName(b), 154 | b.format !== 'other' || b.guid ? 'Y' : 'N', 155 | b.leaky ? 'Y' : 'N', 156 | b.random ? 'Y' : 'N', 157 | b.reuse ? 'Y' : 'N', 158 | !b.defer ? 'Y' : 'N', 159 | b.cacheSize || '', 160 | b.format, 161 | b.hz, 162 | b.stats.deviation, 163 | b.stats.mean, 164 | b.stats.moe, 165 | b.stats.rme, 166 | b.stats.sample.length, 167 | b.stats.sem, 168 | b.stats.variance 169 | ] 170 | }) 171 | 172 | arr.unshift([ 173 | 'Method', 174 | 'GUID', 175 | 'Leaky', 176 | 'Random', 177 | 'Re-use', 178 | 'Sync', 179 | 'Cache', 180 | 'Format', 181 | 'Ops/sec', 182 | 'Deviation', 183 | 'Mean', 184 | 'MOE', 185 | 'RME', 186 | 'Samples', 187 | 'SEM', 188 | 'Variance' 189 | ]) 190 | 191 | toCsv(arr, cb) 192 | } 193 | 194 | function fullName (b) { 195 | return b.name + (b.postfix ? ' ' + b.postfix : '') 196 | } 197 | 198 | function desc (b) { 199 | return `${fullName(b)} (format: ${b.format}, re-use: ${!!b.reuse}, cache: ${b.cacheSize || 'n/a'}, sync: ${!b.defer})` 200 | } 201 | 202 | function method (b) { 203 | return `[${b.name}] ${b.postfix || ''}` 204 | } 205 | 206 | function features (b) { 207 | return guid(b) + random(b) + secure(b) 208 | } 209 | 210 | function check (bool) { 211 | return bool ? '✅' : '' 212 | } 213 | 214 | function guid (b) { 215 | return b.guid ? '🌎' : '' 216 | } 217 | 218 | function secure (b) { 219 | return b.leaky ? '' : '🛡️' 220 | } 221 | 222 | function random (b) { 223 | return b.random ? '🔀' : '' 224 | } 225 | -------------------------------------------------------------------------------- /benchmarks/crypto.randomBytes.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const crypto = require('crypto') 4 | 5 | module.exports = function (suite) { 6 | const name = 'crypto.randomBytes' 7 | 8 | suite.add(name, function (deferred) { 9 | crypto.randomBytes(16, function (_, buf) { 10 | buf.toString('hex') 11 | deferred.resolve() 12 | }) 13 | }, { 14 | defer: true, 15 | format: 'hex' 16 | }) 17 | 18 | suite.add(name, function () { 19 | crypto.randomBytes(16).toString('hex') 20 | }, { 21 | format: 'hex' 22 | }) 23 | 24 | suite.add(name, function (deferred) { 25 | crypto.randomBytes(16, function (_, buf) { 26 | deferred.resolve() 27 | }) 28 | }, { 29 | defer: true, 30 | format: 'buffer' 31 | }) 32 | 33 | suite.add(name, function () { 34 | crypto.randomBytes(16) 35 | }, { 36 | format: 'buffer' 37 | }) 38 | 39 | for (const cacheSize of suite.cacheSizes) { 40 | suite.add(name, function () { 41 | if (this.offset % cacheSize === 0) { 42 | this.cache = crypto.randomBytes(cacheSize) 43 | const buf = this.cache.slice(0, 16) 44 | buf.toString('hex') 45 | this.offset = 16 46 | } else { 47 | const buf = this.cache.slice(this.offset, this.offset + 16) 48 | buf.toString('hex') 49 | this.offset += 16 50 | } 51 | }, { 52 | onStart () { 53 | this.offset = 0 54 | }, 55 | format: 'hex', 56 | cacheSize 57 | }) 58 | 59 | suite.add(name, function () { 60 | if (this.offset % cacheSize === 0) { 61 | this.cache = crypto.randomBytes(cacheSize) 62 | this.cache.copy(this.buf, 0, 0, 16) 63 | this.buf.toString('hex') 64 | this.offset = 16 65 | } else { 66 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 67 | this.buf.toString('hex') 68 | this.offset += 16 69 | } 70 | }, { 71 | onStart () { 72 | this.offset = 0 73 | this.buf = Buffer.alloc(16) 74 | }, 75 | format: 'hex', 76 | reuse: true, 77 | cacheSize 78 | }) 79 | 80 | suite.add(name, function (deferred) { 81 | if (this.offset % cacheSize === 0) { 82 | crypto.randomBytes(cacheSize, (_, _buf) => { 83 | this.cache = _buf 84 | const buf = this.cache.slice(0, 16) 85 | buf.toString('hex') 86 | this.offset = 16 87 | deferred.resolve() 88 | }) 89 | } else { 90 | const buf = this.cache.slice(this.offset, this.offset + 16) 91 | buf.toString('hex') 92 | this.offset += 16 93 | process.nextTick(function () { 94 | deferred.resolve() 95 | }) 96 | } 97 | }, { 98 | onStart () { 99 | this.offset = 0 100 | }, 101 | defer: true, 102 | format: 'hex', 103 | cacheSize 104 | }) 105 | 106 | suite.add(name, function (deferred) { 107 | if (this.offset % cacheSize === 0) { 108 | crypto.randomBytes(cacheSize, (_, _buf) => { 109 | this.cache = _buf 110 | this.cache.copy(this.buf, 0, 0, 16) 111 | this.buf.toString('hex') 112 | this.offset = 16 113 | deferred.resolve() 114 | }) 115 | } else { 116 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 117 | this.buf.toString('hex') 118 | this.offset += 16 119 | process.nextTick(function () { 120 | deferred.resolve() 121 | }) 122 | } 123 | }, { 124 | onStart () { 125 | this.offset = 0 126 | this.buf = Buffer.alloc(16) 127 | }, 128 | defer: true, 129 | format: 'hex', 130 | reuse: true, 131 | cacheSize 132 | }) 133 | 134 | suite.add(name, function () { 135 | if (this.offset % cacheSize === 0) { 136 | this.cache = crypto.randomBytes(cacheSize) 137 | this.cache.slice(0, 16) 138 | this.offset = 16 139 | } else { 140 | this.cache.slice(this.offset, this.offset + 16) 141 | this.offset += 16 142 | } 143 | }, { 144 | onStart () { 145 | this.offset = 0 146 | }, 147 | format: 'buffer', 148 | cacheSize 149 | }) 150 | 151 | suite.add(name, function () { 152 | if (this.offset % cacheSize === 0) { 153 | this.cache = crypto.randomBytes(cacheSize) 154 | this.cache.copy(this.buf, 0, 0, 16) 155 | this.offset = 16 156 | } else { 157 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 158 | this.offset += 16 159 | } 160 | }, { 161 | onStart () { 162 | this.offset = 0 163 | this.buf = Buffer.alloc(16) 164 | }, 165 | format: 'buffer', 166 | reuse: true, 167 | cacheSize 168 | }) 169 | 170 | suite.add(name, function (deferred) { 171 | if (this.offset % cacheSize === 0) { 172 | crypto.randomBytes(cacheSize, (_, _buf) => { 173 | this.cache = _buf 174 | this.cache.slice(0, 16) 175 | this.offset = 16 176 | deferred.resolve() 177 | }) 178 | } else { 179 | this.cache.slice(this.offset, this.offset + 16) 180 | this.offset += 16 181 | process.nextTick(function () { 182 | deferred.resolve() 183 | }) 184 | } 185 | }, { 186 | onStart () { 187 | this.offset = 0 188 | }, 189 | defer: true, 190 | format: 'buffer', 191 | cacheSize 192 | }) 193 | 194 | suite.add(name, function (deferred) { 195 | if (this.offset % cacheSize === 0) { 196 | crypto.randomBytes(cacheSize, (_, _buf) => { 197 | this.cache = _buf 198 | this.cache.copy(this.buf, 0, 0, 16) 199 | this.offset = 16 200 | deferred.resolve() 201 | }) 202 | } else { 203 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 204 | this.offset += 16 205 | process.nextTick(function () { 206 | deferred.resolve() 207 | }) 208 | } 209 | }, { 210 | onStart () { 211 | this.offset = 0 212 | this.buf = Buffer.alloc(16) 213 | }, 214 | defer: true, 215 | format: 'buffer', 216 | reuse: true, 217 | cacheSize 218 | }) 219 | } 220 | } 221 | -------------------------------------------------------------------------------- /benchmarks/dev-random.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const fs = require('fs') 4 | 5 | module.exports = function (suite) { 6 | const randomGen = ['/dev/random', '/dev/urandom'] 7 | 8 | for (const path of randomGen) { 9 | suite.add(path, function (deferred) { 10 | fs.read(this.fd, this.buf, 0, 16, null, function (_, bytesRead, buf) { 11 | buf.toString('hex') 12 | deferred.resolve() 13 | }) 14 | }, { 15 | onStart () { 16 | this.fd = fs.openSync(path, 'r') 17 | this.buf = Buffer.alloc(16) 18 | }, 19 | defer: true, 20 | leaky: path === '/dev/urandom', 21 | format: 'hex', 22 | reuse: true 23 | }) 24 | 25 | suite.add(path, function () { 26 | fs.readSync(this.fd, this.buf, 0, 16) 27 | this.buf.toString('hex') 28 | }, { 29 | onStart () { 30 | this.fd = fs.openSync(path, 'r') 31 | this.buf = Buffer.alloc(16) 32 | }, 33 | leaky: path === '/dev/urandom', 34 | format: 'hex', 35 | reuse: true 36 | }) 37 | 38 | suite.add(path, function (deferred) { 39 | fs.read(this.fd, this.buf, 0, 16, null, function (_, bytesRead, buf) { 40 | deferred.resolve() 41 | }) 42 | }, { 43 | onStart () { 44 | this.fd = fs.openSync(path, 'r') 45 | this.buf = Buffer.alloc(16) 46 | }, 47 | defer: true, 48 | leaky: path === '/dev/urandom', 49 | format: 'buffer', 50 | reuse: true 51 | }) 52 | 53 | suite.add(path, function () { 54 | fs.readSync(this.fd, this.buf, 0, 16) 55 | }, { 56 | onStart () { 57 | this.fd = fs.openSync(path, 'r') 58 | this.buf = Buffer.alloc(16) 59 | }, 60 | leaky: path === '/dev/urandom', 61 | format: 'buffer', 62 | reuse: true 63 | }) 64 | 65 | for (const cacheSize of suite.cacheSizes) { 66 | suite.add(path, function (deferred) { 67 | if (this.offset % cacheSize === 0) { 68 | fs.read(this.fd, this.cache, 0, cacheSize, null, (_, bytesRead, cache) => { 69 | const buf = cache.slice(0, 16) 70 | buf.toString('hex') 71 | this.offset = 16 72 | deferred.resolve() 73 | }) 74 | } else { 75 | const buf = this.cache.slice(this.offset, this.offset + 16) 76 | buf.toString('hex') 77 | this.offset += 16 78 | process.nextTick(function () { 79 | deferred.resolve() 80 | }) 81 | } 82 | }, { 83 | onStart () { 84 | this.fd = fs.openSync(path, 'r') 85 | this.cache = Buffer.alloc(cacheSize) 86 | this.offset = 0 87 | }, 88 | defer: true, 89 | leaky: path === '/dev/urandom', 90 | format: 'hex', 91 | cacheSize 92 | }) 93 | 94 | suite.add(path, function (deferred) { 95 | if (this.offset % cacheSize === 0) { 96 | fs.read(this.fd, this.cache, 0, cacheSize, null, (_, bytesRead, cache) => { 97 | cache.copy(this.buf, 0, 0, 16) 98 | this.buf.toString('hex') 99 | this.offset = 16 100 | deferred.resolve() 101 | }) 102 | } else { 103 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 104 | this.buf.toString('hex') 105 | this.offset += 16 106 | process.nextTick(function () { 107 | deferred.resolve() 108 | }) 109 | } 110 | }, { 111 | onStart () { 112 | this.fd = fs.openSync(path, 'r') 113 | this.cache = Buffer.alloc(cacheSize) 114 | this.buf = Buffer.alloc(16) 115 | this.offset = 0 116 | }, 117 | defer: true, 118 | leaky: path === '/dev/urandom', 119 | format: 'hex', 120 | reuse: true, 121 | cacheSize 122 | }) 123 | 124 | suite.add(path, function () { 125 | if (this.offset % cacheSize === 0) { 126 | fs.readSync(this.fd, this.cache, 0, cacheSize) 127 | this.cache.copy(this.buf, 0, 0, 16) 128 | this.buf.toString('hex') 129 | this.offset = 16 130 | } else { 131 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 132 | this.buf.toString('hex') 133 | this.offset += 16 134 | } 135 | }, { 136 | onStart () { 137 | this.fd = fs.openSync(path, 'r') 138 | this.cache = Buffer.alloc(cacheSize) 139 | this.buf = Buffer.alloc(16) 140 | this.offset = 0 141 | }, 142 | leaky: path === '/dev/urandom', 143 | format: 'hex', 144 | reuse: true, 145 | cacheSize 146 | }) 147 | 148 | suite.add(path, function (deferred) { 149 | if (this.offset % cacheSize === 0) { 150 | fs.read(this.fd, this.cache, 0, cacheSize, null, (_, bytesRead, cache) => { 151 | cache.slice(0, 16) 152 | this.offset = 16 153 | deferred.resolve() 154 | }) 155 | } else { 156 | this.cache.slice(this.offset, this.offset + 16) 157 | this.offset += 16 158 | process.nextTick(function () { 159 | deferred.resolve() 160 | }) 161 | } 162 | }, { 163 | onStart () { 164 | this.fd = fs.openSync(path, 'r') 165 | this.cache = Buffer.alloc(cacheSize) 166 | this.offset = 0 167 | }, 168 | defer: true, 169 | leaky: path === '/dev/urandom', 170 | format: 'buffer', 171 | cacheSize 172 | }) 173 | 174 | suite.add(path, function (deferred) { 175 | if (this.offset % cacheSize === 0) { 176 | fs.read(this.fd, this.cache, 0, cacheSize, null, (_, bytesRead, cache) => { 177 | cache.copy(this.buf, 0, 0, 16) 178 | this.offset = 16 179 | deferred.resolve() 180 | }) 181 | } else { 182 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 183 | this.offset += 16 184 | process.nextTick(function () { 185 | deferred.resolve() 186 | }) 187 | } 188 | }, { 189 | onStart () { 190 | this.fd = fs.openSync(path, 'r') 191 | this.cache = Buffer.alloc(cacheSize) 192 | this.buf = Buffer.alloc(16) 193 | this.offset = 0 194 | }, 195 | defer: true, 196 | leaky: path === '/dev/urandom', 197 | format: 'buffer', 198 | reuse: true, 199 | cacheSize 200 | }) 201 | 202 | suite.add(path, function () { 203 | if (this.offset % cacheSize === 0) { 204 | fs.readSync(this.fd, this.cache, 0, cacheSize) 205 | this.cache.copy(this.buf, 0, 0, 16) 206 | this.offset = 16 207 | } else { 208 | this.cache.copy(this.buf, 0, this.offset, this.offset + 16) 209 | this.offset += 16 210 | } 211 | }, { 212 | onStart () { 213 | this.fd = fs.openSync(path, 'r') 214 | this.cache = Buffer.alloc(cacheSize) 215 | this.buf = Buffer.alloc(16) 216 | this.offset = 0 217 | }, 218 | leaky: path === '/dev/urandom', 219 | format: 'buffer', 220 | reuse: true, 221 | cacheSize 222 | }) 223 | } 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Node.js UUID Benchmark 🐢🚀 2 | 3 | The following benchmark results are generated on a MacBook (Early 2016) 4 | with a 1,3 GHz Intel Core m7 processor using Node.js 10.8.0. 5 | 6 | To run them your self, run: 7 | 8 | ``` 9 | npm run bench 10 | ``` 11 | 12 | _See raw results in [`results.csv`](results.csv)_ 13 | 14 | ## 128 bit UUID 15 | 16 | 17 | | Method | Features | Re-use | Sync | Cache | Format | Ops/sec | RME | Samples | 18 | | :----------------------- | :------- | :----: | :--: | ----: | :----- | --------: | :----- | ------: | 19 | | [uuid/v1] | 🌎 | | ✅ | | uuid | 1,031,720 | ±1.68% | 89 | 20 | | [uuid/v1] | 🌎 | | ✅ | | hex | 402,318 | ±1.38% | 86 | 21 | | [uuid/v1] | 🌎 | ✅ | ✅ | | hex | 544,231 | ±1.02% | 91 | 22 | | [uuid/v1] | 🌎 | | ✅ | | buffer | 463,279 | ±2.10% | 84 | 23 | | [uuid/v1] | 🌎 | ✅ | ✅ | | buffer | 625,377 | ±1.61% | 91 | 24 | | [uuid/v4] | 🌎🔀🛡️ | | ✅ | | uuid | 242,402 | ±1.77% | 88 | 25 | | [uuid/v4] | 🌎🔀🛡️ | | ✅ | | hex | 224,290 | ±3.78% | 81 | 26 | | [uuid/v4] | 🌎🔀🛡️ | ✅ | ✅ | | hex | 261,648 | ±3.28% | 87 | 27 | | [uuid/v4] | 🌎🔀🛡️ | | ✅ | | buffer | 248,587 | ±5.01% | 79 | 28 | | [uuid/v4] | 🌎🔀🛡️ | ✅ | ✅ | | buffer | 293,626 | ±3.17% | 89 | 29 | | [fast-uuid] | 🌎🔀 | | ✅ | | uuid | 647,364 | ±0.82% | 91 | 30 | | [uuid-random] | 🌎🔀🛡️ | | ✅ | 512 | uuid | 1,249,273 | ±0.93% | 92 | 31 | | [uuid-random] | 🌎🔀🛡️ | | ✅ | 512 | hex | 1,182,259 | ±0.92% | 92 | 32 | | [uuid-random] | 🌎🔀🛡️ | | ✅ | 512 | buffer | 1,749,568 | ±0.94% | 91 | 33 | | [sodium-uuid] | 🌎🔀🛡️ | | ✅ | | hex | 222,468 | ±0.74% | 85 | 34 | | [sodium-uuid] | 🌎🔀🛡️ | ✅ | ✅ | | hex | 230,227 | ±0.97% | 90 | 35 | | [sodium-uuid] | 🌎🔀🛡️ | | ✅ | | buffer | 282,921 | ±0.76% | 95 | 36 | | [sodium-uuid] | 🌎🔀🛡️ | ✅ | ✅ | | buffer | 285,123 | ±0.79% | 91 | 37 | | [sodium-native] | 🌎🔀🛡️ | | ✅ | | hex | 207,240 | ±1.85% | 92 | 38 | | [sodium-native] | 🌎🔀🛡️ | ✅ | ✅ | | hex | 246,718 | ±1.20% | 93 | 39 | | [sodium-native] | 🌎🔀🛡️ | | ✅ | | buffer | 218,728 | ±2.85% | 87 | 40 | | [sodium-native] | 🌎🔀🛡️ | ✅ | ✅ | | buffer | 288,010 | ±0.76% | 95 | 41 | | [sodium-native] | 🌎🔀🛡️ | | ✅ | 256 | hex | 487,380 | ±0.66% | 95 | 42 | | [sodium-native] | 🌎🔀🛡️ | ✅ | ✅ | 256 | hex | 484,132 | ±0.69% | 89 | 43 | | [sodium-native] | 🌎🔀🛡️ | | ✅ | 256 | buffer | 579,664 | ±0.59% | 87 | 44 | | [sodium-native] | 🌎🔀🛡️ | ✅ | ✅ | 256 | buffer | 567,894 | ±0.72% | 86 | 45 | | [sodium-native] | 🌎🔀🛡️ | | ✅ | 4096 | hex | 509,949 | ±4.29% | 85 | 46 | | [sodium-native] | 🌎🔀🛡️ | ✅ | ✅ | 4096 | hex | 514,632 | ±0.95% | 92 | 47 | | [sodium-native] | 🌎🔀🛡️ | | ✅ | 4096 | buffer | 589,869 | ±0.83% | 91 | 48 | | [sodium-native] | 🌎🔀🛡️ | ✅ | ✅ | 4096 | buffer | 584,236 | ±0.59% | 93 | 49 | | [sodium-native] | 🌎🔀🛡️ | | ✅ | 65536 | hex | 549,442 | ±0.98% | 27 | 50 | | [sodium-native] | 🌎🔀🛡️ | ✅ | ✅ | 65536 | hex | 503,349 | ±0.76% | 81 | 51 | | [sodium-native] | 🌎🔀🛡️ | | ✅ | 65536 | buffer | 592,077 | ±1.12% | 87 | 52 | | [sodium-native] | 🌎🔀🛡️ | ✅ | ✅ | 65536 | buffer | 635,565 | ±0.92% | 18 | 53 | | [crypto.randomBytes] | 🌎🔀🛡️ | | | | hex | 36,611 | ±1.81% | 73 | 54 | | [crypto.randomBytes] | 🌎🔀🛡️ | | ✅ | | hex | 247,546 | ±2.87% | 87 | 55 | | [crypto.randomBytes] | 🌎🔀🛡️ | | | | buffer | 38,647 | ±1.39% | 76 | 56 | | [crypto.randomBytes] | 🌎🔀🛡️ | | ✅ | | buffer | 283,446 | ±2.93% | 88 | 57 | | [crypto.randomBytes] | 🌎🔀🛡️ | | ✅ | 256 | hex | 930,412 | ±1.40% | 88 | 58 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | ✅ | 256 | hex | 893,849 | ±1.18% | 91 | 59 | | [crypto.randomBytes] | 🌎🔀🛡️ | | | 256 | hex | 322,917 | ±1.66% | 76 | 60 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | | 256 | hex | 319,095 | ±1.52% | 74 | 61 | | [crypto.randomBytes] | 🌎🔀🛡️ | | ✅ | 256 | buffer | 1,263,214 | ±1.34% | 85 | 62 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | ✅ | 256 | buffer | 1,210,984 | ±2.24% | 85 | 63 | | [crypto.randomBytes] | 🌎🔀🛡️ | | | 256 | buffer | 374,283 | ±2.25% | 74 | 64 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | | 256 | buffer | 385,773 | ±1.32% | 72 | 65 | | [crypto.randomBytes] | 🌎🔀🛡️ | | ✅ | 4096 | hex | 1,213,789 | ±0.61% | 94 | 66 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | ✅ | 4096 | hex | 1,132,888 | ±1.04% | 90 | 67 | | [crypto.randomBytes] | 🌎🔀🛡️ | | | 4096 | hex | 798,433 | ±2.15% | 74 | 68 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | | 4096 | hex | 803,000 | ±1.31% | 78 | 69 | | [crypto.randomBytes] | 🌎🔀🛡️ | | ✅ | 4096 | buffer | 1,810,661 | ±1.08% | 89 | 70 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | ✅ | 4096 | buffer | 1,708,659 | ±1.13% | 93 | 71 | | [crypto.randomBytes] | 🌎🔀🛡️ | | | 4096 | buffer | 1,179,573 | ±1.65% | 73 | 72 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | | 4096 | buffer | 1,084,560 | ±1.86% | 74 | 73 | | [crypto.randomBytes] | 🌎🔀🛡️ | | ✅ | 65536 | hex | 1,238,794 | ±0.67% | 90 | 74 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | ✅ | 65536 | hex | 1,162,037 | ±0.68% | 91 | 75 | | [crypto.randomBytes] | 🌎🔀🛡️ | | | 65536 | hex | 937,338 | ±1.01% | 77 | 76 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | | 65536 | hex | 910,588 | ±1.20% | 75 | 77 | | [crypto.randomBytes] | 🌎🔀🛡️ | | ✅ | 65536 | buffer | 1,907,768 | ±0.93% | 84 | 78 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | ✅ | 65536 | buffer | 1,789,604 | ±0.58% | 90 | 79 | | [crypto.randomBytes] | 🌎🔀🛡️ | | | 65536 | buffer | 1,359,017 | ±1.67% | 75 | 80 | | [crypto.randomBytes] | 🌎🔀🛡️ | ✅ | | 65536 | buffer | 1,349,288 | ±1.19% | 77 | 81 | | [crypto.randomFillSync] | 🌎🔀🛡️ | ✅ | ✅ | | hex | 297,034 | ±3.03% | 91 | 82 | | [crypto.randomFillSync] | 🌎🔀🛡️ | ✅ | ✅ | | buffer | 352,826 | ±0.58% | 95 | 83 | | [crypto.randomFillSync] | 🌎🔀🛡️ | | ✅ | 256 | hex | 972,593 | ±2.21% | 89 | 84 | | [crypto.randomFillSync] | 🌎🔀🛡️ | ✅ | ✅ | 256 | hex | 1,003,555 | ±1.26% | 91 | 85 | | [crypto.randomFillSync] | 🌎🔀🛡️ | | ✅ | 256 | buffer | 1,533,437 | ±0.94% | 89 | 86 | | [crypto.randomFillSync] | 🌎🔀🛡️ | ✅ | ✅ | 256 | buffer | 1,498,401 | ±0.83% | 89 | 87 | | [crypto.randomFillSync] | 🌎🔀🛡️ | | ✅ | 4096 | hex | 1,299,413 | ±1.33% | 92 | 88 | | [crypto.randomFillSync] | 🌎🔀🛡️ | ✅ | ✅ | 4096 | hex | 1,277,688 | ±0.94% | 89 | 89 | | [crypto.randomFillSync] | 🌎🔀🛡️ | | ✅ | 4096 | buffer | 2,127,692 | ±1.18% | 90 | 90 | | [crypto.randomFillSync] | 🌎🔀🛡️ | ✅ | ✅ | 4096 | buffer | 2,030,611 | ±0.78% | 95 | 91 | | [crypto.randomFillSync] | 🌎🔀🛡️ | | ✅ | 65536 | hex | 1,411,415 | ±0.73% | 61 | 92 | | [crypto.randomFillSync] | 🌎🔀🛡️ | ✅ | ✅ | 65536 | hex | 1,351,733 | ±1.12% | 64 | 93 | | [crypto.randomFillSync] | 🌎🔀🛡️ | | ✅ | 65536 | buffer | 2,173,932 | ±0.94% | 91 | 94 | | [crypto.randomFillSync] | 🌎🔀🛡️ | ✅ | ✅ | 65536 | buffer | 1,978,253 | ±1.79% | 89 | 95 | | [crypto.randomFill] | 🌎🔀🛡️ | ✅ | | | hex | 35,753 | ±1.64% | 74 | 96 | | [crypto.randomFill] | 🌎🔀🛡️ | ✅ | | | buffer | 40,443 | ±1.72% | 76 | 97 | | [crypto.randomFill] | 🌎🔀🛡️ | | | 256 | hex | 337,253 | ±1.89% | 69 | 98 | | [crypto.randomFill] | 🌎🔀🛡️ | ✅ | | 256 | hex | 342,601 | ±1.53% | 74 | 99 | | [crypto.randomFill] | 🌎🔀🛡️ | | | 256 | buffer | 394,036 | ±1.80% | 73 | 100 | | [crypto.randomFill] | 🌎🔀🛡️ | ✅ | | 256 | buffer | 398,759 | ±1.55% | 73 | 101 | | [crypto.randomFill] | 🌎🔀🛡️ | | | 4096 | hex | 838,637 | ±1.58% | 75 | 102 | | [crypto.randomFill] | 🌎🔀🛡️ | ✅ | | 4096 | hex | 795,834 | ±1.19% | 77 | 103 | | [crypto.randomFill] | 🌎🔀🛡️ | | | 4096 | buffer | 1,099,979 | ±4.33% | 73 | 104 | | [crypto.randomFill] | 🌎🔀🛡️ | ✅ | | 4096 | buffer | 1,124,590 | ±1.94% | 72 | 105 | | [crypto.randomFill] | 🌎🔀🛡️ | | | 65536 | hex | 910,602 | ±1.70% | 77 | 106 | | [crypto.randomFill] | 🌎🔀🛡️ | ✅ | | 65536 | hex | 899,567 | ±1.12% | 78 | 107 | | [crypto.randomFill] | 🌎🔀🛡️ | | | 65536 | buffer | 1,379,134 | ±1.24% | 77 | 108 | | [crypto.randomFill] | 🌎🔀🛡️ | ✅ | | 65536 | buffer | 1,356,052 | ±1.10% | 74 | 109 | | [/dev/random] | 🌎🔀🛡️ | ✅ | | | hex | 40,092 | ±1.67% | 73 | 110 | | [/dev/random] | 🌎🔀🛡️ | ✅ | ✅ | | hex | 226,814 | ±0.46% | 96 | 111 | | [/dev/random] | 🌎🔀🛡️ | ✅ | | | buffer | 41,103 | ±2.07% | 76 | 112 | | [/dev/random] | 🌎🔀🛡️ | ✅ | ✅ | | buffer | 262,087 | ±0.66% | 93 | 113 | | [/dev/random] | 🌎🔀🛡️ | | | 256 | hex | 234,066 | ±1.29% | 77 | 114 | | [/dev/random] | 🌎🔀🛡️ | ✅ | | 256 | hex | 235,687 | ±1.66% | 75 | 115 | | [/dev/random] | 🌎🔀🛡️ | ✅ | ✅ | 256 | hex | 443,135 | ±0.88% | 88 | 116 | | [/dev/random] | 🌎🔀🛡️ | | | 256 | buffer | 269,161 | ±1.50% | 72 | 117 | | [/dev/random] | 🌎🔀🛡️ | ✅ | | 256 | buffer | 267,478 | ±1.62% | 72 | 118 | | [/dev/random] | 🌎🔀🛡️ | ✅ | ✅ | 256 | buffer | 525,963 | ±0.59% | 92 | 119 | | [/dev/random] | 🌎🔀🛡️ | | | 4096 | hex | 381,099 | ±1.53% | 77 | 120 | | [/dev/random] | 🌎🔀🛡️ | ✅ | | 4096 | hex | 388,474 | ±1.50% | 77 | 121 | | [/dev/random] | 🌎🔀🛡️ | ✅ | ✅ | 4096 | hex | 491,756 | ±0.60% | 93 | 122 | | [/dev/random] | 🌎🔀🛡️ | | | 4096 | buffer | 454,175 | ±1.28% | 76 | 123 | | [/dev/random] | 🌎🔀🛡️ | ✅ | | 4096 | buffer | 448,020 | ±1.31% | 77 | 124 | | [/dev/random] | 🌎🔀🛡️ | ✅ | ✅ | 4096 | buffer | 574,020 | ±0.64% | 94 | 125 | | [/dev/random] | 🌎🔀🛡️ | | | 65536 | hex | 409,728 | ±1.48% | 75 | 126 | | [/dev/random] | 🌎🔀🛡️ | ✅ | | 65536 | hex | 450,289 | ±1.31% | 50 | 127 | | [/dev/random] | 🌎🔀🛡️ | ✅ | ✅ | 65536 | hex | 541,220 | ±1.04% | 31 | 128 | | [/dev/random] | 🌎🔀🛡️ | | | 65536 | buffer | 483,239 | ±1.34% | 74 | 129 | | [/dev/random] | 🌎🔀🛡️ | ✅ | | 65536 | buffer | 525,563 | ±1.42% | 49 | 130 | | [/dev/random] | 🌎🔀🛡️ | ✅ | ✅ | 65536 | buffer | 636,141 | ±0.76% | 19 | 131 | | [/dev/urandom] | 🌎🔀 | ✅ | | | hex | 39,507 | ±1.28% | 76 | 132 | | [/dev/urandom] | 🌎🔀 | ✅ | ✅ | | hex | 225,501 | ±1.16% | 96 | 133 | | [/dev/urandom] | 🌎🔀 | ✅ | | | buffer | 42,675 | ±1.60% | 75 | 134 | | [/dev/urandom] | 🌎🔀 | ✅ | ✅ | | buffer | 262,925 | ±0.53% | 96 | 135 | | [/dev/urandom] | 🌎🔀 | | | 256 | hex | 242,490 | ±1.25% | 76 | 136 | | [/dev/urandom] | 🌎🔀 | ✅ | | 256 | hex | 247,783 | ±1.28% | 74 | 137 | | [/dev/urandom] | 🌎🔀 | ✅ | ✅ | 256 | hex | 449,219 | ±0.57% | 95 | 138 | | [/dev/urandom] | 🌎🔀 | | | 256 | buffer | 260,615 | ±1.44% | 73 | 139 | | [/dev/urandom] | 🌎🔀 | ✅ | | 256 | buffer | 268,182 | ±1.63% | 74 | 140 | | [/dev/urandom] | 🌎🔀 | ✅ | ✅ | 256 | buffer | 529,952 | ±0.34% | 91 | 141 | | [/dev/urandom] | 🌎🔀 | | | 4096 | hex | 393,407 | ±1.38% | 73 | 142 | | [/dev/urandom] | 🌎🔀 | ✅ | | 4096 | hex | 386,528 | ±1.07% | 78 | 143 | | [/dev/urandom] | 🌎🔀 | ✅ | ✅ | 4096 | hex | 489,407 | ±0.71% | 92 | 144 | | [/dev/urandom] | 🌎🔀 | | | 4096 | buffer | 450,002 | ±1.35% | 73 | 145 | | [/dev/urandom] | 🌎🔀 | ✅ | | 4096 | buffer | 446,349 | ±1.50% | 78 | 146 | | [/dev/urandom] | 🌎🔀 | ✅ | ✅ | 4096 | buffer | 573,550 | ±0.72% | 91 | 147 | | [/dev/urandom] | 🌎🔀 | | | 65536 | hex | 416,024 | ±1.48% | 76 | 148 | | [/dev/urandom] | 🌎🔀 | ✅ | | 65536 | hex | 445,563 | ±1.30% | 51 | 149 | | [/dev/urandom] | 🌎🔀 | ✅ | ✅ | 65536 | hex | 539,710 | ±0.82% | 32 | 150 | | [/dev/urandom] | 🌎🔀 | | | 65536 | buffer | 492,679 | ±1.67% | 71 | 151 | | [/dev/urandom] | 🌎🔀 | ✅ | | 65536 | buffer | 479,059 | ±1.36% | 74 | 152 | | [/dev/urandom] | 🌎🔀 | ✅ | ✅ | 65536 | buffer | 637,976 | ±0.65% | 20 | 153 | 154 | 155 | ## Non UUID 156 | 157 | The following ID generators does not generate 128 bit id's. Beware that 158 | not all of them are globally unique. 159 | 160 | 161 | | Method | Features | Re-use | Sync | Cache | Ops/sec | RME | Samples | Example | 162 | | :------------------- | :------- | :----: | :--: | ----: | --------: | :----- | ------: | :---------------------------------------------- | 163 | | [hyperid] cold start | 🌎 | | ✅ | | 102,478 | ±1.01% | 89 | PK9867v+RGmX2kdtHbPe1g/0 | 164 | | [hyperid] normal | 🌎 | | ✅ | | 8,495,558 | ±2.28% | 83 | PK9867v+RGmX2kdtHbPe1g/0 | 165 | | [cuid] | 🌎 | | ✅ | | 448,945 | ±0.66% | 88 | cjksp2h270000e8hgvs5t9ihj | 166 | | [shortid] | 🔀 | | ✅ | | 22,552 | ±3.58% | 81 | p300jY3TE | 167 | | [nanoid] | 🌎🔀🛡️ | | ✅ | | 237,373 | ±1.36% | 86 | 2nlN~BJaTgdWQm01WS2uG | 168 | 169 | 170 | ## Legend 171 | 172 | - **Method:** Name of npm module, Node.js core function, or OS based random generator used 173 | - **Features:** 174 | - 🌎 (GUID) - The ID is globally unique 175 | - 🛡 (Secure) - The method used to generate the ID doesn't leak metadata and it's not possible to predict what the next ID will be 176 | - 🔀 (Random) - The ID is made up of random data 177 | - **Re-use:** An output buffer was re-used between each test to potentially reduce the number of objects that needed to be allocated 178 | - **Sync:** The ID generation was performed synchronously 179 | - **Cache:** 180 | - <empty> - Only the amount of bytes required to generate a 128 bit number was read into memory 181 | - <Number> - Number of bytes read into memory the first time a 128 bit number was requested. Subsequent runs would use the leftover bytes in the cache until it had been depleted, at which time another chunk of bytes would be read into memory 182 | - **Format:** 183 | - `uuid` - ID is a UUID formatted string representing a 128 bit number, e.g. `3a017fc5-4f50-4db9-b0ce-4547ba0a1bfd` 184 | - `hex` - ID is a hex formatted string representing a 128 bit number, e.g. `3a017fc54f504db9b0ce4547ba0a1bfd` 185 | - `buffer` - ID is a raw 128 bit binary Buffer object 186 | - `other` - ID is **not** a UUID or 128 bit number, and might not be globally unique 187 | - **Ops/sec:** Number of ID's generated per second 188 | - **RME:** The relative margin of error (expressed as a percentage of the mean) 189 | - **Samples:** Number of runs sampled 190 | - **Example:** Example of a generated ID 191 | 192 | ## License 193 | 194 | [MIT](LICENSE) 195 | 196 | [uuid/v1]: https://www.npmjs.com/package/uuid 197 | [uuid/v4]: https://www.npmjs.com/package/uuid 198 | [fast-uuid]: https://www.npmjs.com/package/fast-uuid 199 | [uuid-random]: https://www.npmjs.com/package/uuid-random 200 | [sodium-uuid]: https://www.npmjs.com/package/sodium-uuid 201 | [sodium-native]: https://www.npmjs.com/package/sodium-native 202 | [crypto.randomBytes]: https://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback 203 | [crypto.randomFillSync]: https://nodejs.org/api/crypto.html#crypto_crypto_randomfillsync_buffer_offset_size 204 | [crypto.randomFill]: https://nodejs.org/api/crypto.html#crypto_crypto_randomfill_buffer_offset_size_callback 205 | [/dev/random]: https://en.wikipedia.org/wiki//dev/random 206 | [/dev/urandom]: https://en.wikipedia.org/wiki//dev/random 207 | [hyperid]: https://www.npmjs.com/package/hyperid 208 | [cuid]: https://www.npmjs.com/package/cuid 209 | [shortid]: https://www.npmjs.com/package/shortid 210 | [nanoid]: https://www.npmjs.com/package/nanoid 211 | -------------------------------------------------------------------------------- /results.csv: -------------------------------------------------------------------------------- 1 | Method,GUID,Leaky,Random,Re-use,Sync,Cache,Format,Ops/sec,Deviation,Mean,MOE,RME,Samples,SEM,Variance 2 | uuid/v1,Y,Y,N,N,Y,,uuid,1031719.6577132269,7.81701534719387e-8,9.692555458490222e-7,1.624059860416526e-8,1.675574483294729,89,8.286019696002683e-9,6.1105728938264516e-15 3 | uuid/v1,Y,Y,N,N,Y,,hex,402318.4899251372,1.618916941148916e-7,0.000002485592944500459,3.42161714566226e-8,1.3765798431447989,86,1.7457230335011532e-8,2.620892062338963e-14 4 | uuid/v1,Y,Y,N,Y,Y,,hex,544231.0634853409,9.162559223741003e-8,0.0000018374548369140187,1.8825744923635917e-8,1.0245555180694133,91,9.604971899814243e-9,8.395249152856132e-15 5 | uuid/v1,Y,Y,N,N,Y,,buffer,463279.12130735547,2.114968115552115e-7,0.0000021585259382681423,4.522934024903316e-8,2.095380900788349,84,2.3076194004608756e-8,4.473090129802065e-14 6 | uuid/v1,Y,Y,N,Y,Y,,buffer,625376.7819700743,1.250262896790306e-7,0.0000015990360192934893,2.568838007777745e-8,1.606491646706463,91,1.3106316366212986e-8,1.5631573110904875e-14 7 | uuid/v4,Y,N,Y,N,Y,,uuid,242402.10906752176,3.49814623165921e-7,0.000004125376647285884,7.308911368562943e-8,1.771695530727244,88,3.729036412532114e-8,1.2237027058071533e-13 8 | uuid/v4,Y,N,Y,N,Y,,hex,224289.85179867494,7.738009822035627e-7,0.000004458516477587274,1.6851665834655366e-7,3.7796576326156464,81,8.597788691150697e-8,5.987679600591983e-13 9 | uuid/v4,Y,N,Y,Y,Y,,hex,261648.30474232533,5.967578941830677e-7,0.0000038219242466898955,1.2539915724894636e-7,3.2810476910303095,87,6.397916186170732e-8,3.5611998426980947e-13 10 | uuid/v4,Y,N,Y,N,Y,,buffer,248586.92117470977,9.14025722669351e-7,0.000004022737782319563,2.0155841921524864e-7,5.010478686956012,79,1.0283592817104523e-7,8.354430217012294e-13 11 | uuid/v4,Y,N,Y,Y,Y,,buffer,293625.59449428285,5.189519859216573e-7,0.000003405697659709535,1.0781724896080124e-7,3.165790382285336,89,5.5008800490204716e-8,2.69311163692032e-13 12 | fast-uuid,Y,Y,Y,N,Y,,uuid,647364.0989777222,6.180249246471578e-8,0.0000015447257603242733,1.2698176681586906e-8,0.8220343706135429,91,6.478661572238217e-9,3.819548074851251e-15 13 | uuid-random,Y,N,Y,N,Y,512,uuid,1249272.5135092672,3.645969180938056e-8,8.004658624809982e-7,7.4503238488478255e-9,0.930748480110816,92,3.801185637167258e-9,1.3293091268350118e-15 14 | uuid-random,Y,N,Y,N,Y,512,hex,1182258.8295164818,3.819609026736701e-8,8.458384704210484e-7,7.805146673743745e-9,0.9227703570704741,92,3.9822176906855844e-9,1.458941311712849e-15 15 | uuid-random,Y,N,Y,N,Y,512,buffer,1749567.9672326564,2.617142313341894e-8,5.715696781884557e-7,5.377280781134476e-9,0.9407918205488676,91,2.743510602619631e-9,6.849433888284561e-16 16 | sodium-uuid,Y,N,Y,N,Y,,hex,222467.92375729536,1.554282982277036e-7,0.000004495030038986495,3.304278925466017e-8,0.7350960720634115,85,1.6858565946255187e-8,2.4157955889959975e-14 17 | sodium-uuid,Y,N,Y,Y,Y,,hex,230227.0537876378,2.0423669160242783e-7,0.000004343538187837835,4.2195737646415684e-8,0.9714600360730398,90,2.152843757470188e-8,4.171262619670522e-14 18 | sodium-uuid,Y,N,Y,N,Y,,buffer,282920.7169901425,1.3365436321532618e-7,0.000003534559118323039,2.6876790730847597e-8,0.7604000903965418,95,1.3712648332065101e-8,1.7863488806494337e-14 19 | sodium-uuid,Y,N,Y,Y,Y,,buffer,285122.7070307785,1.3466453665334892e-7,0.000003507261874769068,2.7668691196306177e-8,0.7888972133889487,91,1.4116679181788866e-8,1.8134537432061154e-14 20 | sodium-native,Y,N,Y,N,Y,,hex,207240.29829471873,4.375682885194711e-7,0.0000048253163512527325,8.941450938478267e-8,1.8530289596778284,92,4.561964764529728e-8,1.9146600711785914e-13 21 | sodium-native,Y,N,Y,Y,Y,,hex,246717.54092111095,2.3927813923454727e-7,0.000004053218090073922,4.863149491027646e-8,1.1998242835580932,93,2.4811987199120644e-8,5.72540279155474e-14 22 | sodium-native,Y,N,Y,N,Y,,buffer,218728.2731252032,6.201462236361104e-7,0.000004571882663873022,1.3031384179934887e-7,2.8503321581082504,87,6.648665397925962e-8,3.845813386901286e-13 23 | sodium-native,Y,N,Y,Y,Y,,buffer,288009.8782445676,1.3111218561273395e-7,0.00000347210313095871,2.6365579770114184e-8,0.759354741943802,95,1.3451826413323563e-8,1.7190405216147995e-14 24 | sodium-native,Y,N,Y,N,Y,256,hex,487380.05038919876,6.741483833489369e-8,0.000002051786894439867,1.3556568289220574e-8,0.6607200935904939,95,6.91661647409213e-9,4.544760427719852e-15 25 | sodium-native,Y,N,Y,Y,Y,256,hex,484131.77150183317,6.904217609690419e-8,0.0000020655533449041847,1.4344173817573869e-8,0.6944470281032251,89,7.318456029374423e-9,4.766822080195928e-15 26 | sodium-native,Y,N,Y,N,Y,256,buffer,579663.9898852736,4.8617043350124267e-8,0.0000017251373510331714,1.0216096550154453e-8,0.592190328731571,87,5.212294158242068e-9,2.3636169041078623e-15 27 | sodium-native,Y,N,Y,Y,Y,256,buffer,567894.069219149,5.971378950206565e-8,0.0000017608917828196274,1.262064290016845e-8,0.7167188252738422,86,6.4391035204941074e-9,3.565736656697006e-15 28 | sodium-native,Y,N,Y,N,Y,4096,hex,509948.81871332205,3.95470054257477e-7,0.0000019609811088947146,8.407370992517042e-8,4.287328906118716,85,4.2894749961821645e-8,1.5639656381441183e-13 29 | sodium-native,Y,N,Y,Y,Y,4096,hex,514632.4722237088,9.081203162656623e-8,0.00000194313428314975,1.855690521266708e-8,0.9549986006415888,92,9.467808781973001e-9,8.246825088144465e-15 30 | sodium-native,Y,N,Y,N,Y,4096,buffer,589869.2045017506,6.824112585480127e-8,0.0000016952910787140985,1.4021082944986363e-8,0.8270605043012169,91,7.1536137474420226e-9,4.656851257930827e-15 31 | sodium-native,Y,N,Y,Y,Y,4096,buffer,584235.5581744418,5.0008112619117527e-8,0.000001711638372585016,1.0163775437610121e-8,0.5938039015951831,93,5.185599713066389e-9,2.500811327726342e-15 32 | sodium-native,Y,N,Y,N,Y,65536,hex,549441.5257106683,4.506987945594475e-8,0.000001820029890726884,1.7833132022165486e-8,0.9798263266458379,27,8.673702345411228e-9,2.0312940341733905e-15 33 | sodium-native,Y,N,Y,Y,Y,65536,hex,503348.902973861,6.930181200898726e-8,0.0000019866935123765038,1.5092394615290557e-8,0.7596740272855109,81,7.700201334331917e-9,4.802741147729011e-15 34 | sodium-native,Y,N,Y,N,Y,65536,buffer,592076.7107962571,9.030181749390373e-8,0.0000016889703340216597,1.8975487248954414e-8,1.1234944076117248,87,9.681371045384905e-9,8.154418242702298e-15 35 | sodium-native,Y,N,Y,Y,Y,65536,buffer,635565.2328925795,2.9098795465157453e-8,0.0000015734026158869764,1.447175543710048e-8,0.919774461474522,18,6.858651865924398e-9,8.46739897523068e-16 36 | crypto.randomBytes,Y,N,Y,N,N,,hex,36610.62981834844,0.000002150895702091224,0.000027314471369700996,4.934168689250878e-7,1.8064302334344942,73,2.5174330047198355e-7,4.626352321274499e-12 37 | crypto.randomBytes,Y,N,Y,N,Y,,hex,247546.47668732994,5.520090179505264e-7,0.000004039645457216813,1.1599589434769907e-7,2.8714374955968673,87,5.918157874882606e-8,3.0471395589870455e-13 38 | crypto.randomBytes,Y,N,Y,N,N,,buffer,38646.616632613,0.0000016054675530531306,0.000025875486320220922,3.6095312655127776e-7,1.3949617104170275,76,1.8415975844452948e-7,2.577526063906407e-12 39 | crypto.randomBytes,Y,N,Y,N,Y,,buffer,283446.17582405993,4.949543875045317e-7,0.000003528006673904529,1.0341413737973219e-7,2.931234176642906,88,5.276231498965928e-8,2.449798457099862e-13 40 | crypto.randomBytes,Y,N,Y,N,Y,256,hex,930411.7547583076,7.188293479965226e-8,0.0000010747929557916745,1.501898332916891e-8,1.3973838633977813,88,7.66274659651475e-9,5.167156315411059e-15 41 | crypto.randomBytes,Y,N,Y,Y,Y,256,hex,893848.8587916942,6.437075488739236e-8,0.0000011187573717460478,1.3225861710252157e-8,1.1821921396245656,91,6.747888627679672e-9,4.1435940847727465e-15 42 | crypto.randomBytes,Y,N,Y,N,N,256,hex,322917.4761290008,2.284879438884684e-7,0.0000030967664308156387,5.1370354741193735e-8,1.658838530087773,76,2.6209364663874355e-8,5.220674050237989e-14 43 | crypto.randomBytes,Y,N,Y,Y,N,256,hex,319095.07320236316,2.0867487548329487e-7,0.00000313386223724558,4.7545604618583325e-8,1.5171568186217461,74,2.4257961540093534e-8,4.3545203657968623e-14 44 | crypto.randomBytes,Y,N,Y,N,Y,256,buffer,1263213.625570878,4.978639061893724e-8,7.916317396814612e-7,1.0584180819902414e-8,1.3370081427206675,85,5.400092255052252e-9,2.478684690861402e-15 45 | crypto.randomBytes,Y,N,Y,Y,Y,256,buffer,1210984.2368030117,8.68376216171147e-8,8.257745803859442e-7,1.846097051301825e-8,2.235594428735031,85,9.418862506641963e-9,7.540772528117186e-15 46 | crypto.randomBytes,Y,N,Y,N,N,256,buffer,374282.62845739897,2.635940553226913e-7,0.000002671777752874845,6.005868557561425e-8,2.247892269893738,74,3.0642186518170536e-8,6.948182600146205e-14 47 | crypto.randomBytes,Y,N,Y,Y,N,256,buffer,385772.902414172,1.4836476116123325e-7,0.0000025921986581794278,3.4270511377368646e-8,1.3220634641265405,72,1.748495478437176e-8,2.201210235442979e-14 48 | crypto.randomBytes,Y,N,Y,N,Y,4096,hex,1213789.448255142,2.4848569880801697e-8,8.238661173381672e-7,5.02335121118422e-9,0.6097290695015093,94,2.5629342914205204e-9,6.174514251210853e-16 49 | crypto.randomBytes,Y,N,Y,Y,Y,4096,hex,1132887.8618854391,4.4608077890367834e-8,8.82699897883735e-7,9.216124374149732e-9,1.044083543710077,90,4.702104272525374e-9,1.989880613073124e-15 50 | crypto.randomBytes,Y,N,Y,N,N,4096,hex,798432.9302304533,1.18253956846412e-7,0.000001252453352232564,2.694361678079744e-8,2.151267089729851,74,1.3746743255508898e-8,1.3983998309833073e-14 51 | crypto.randomBytes,Y,N,Y,Y,N,4096,hex,803000.145546107,7.352531838147804e-8,0.000001245329786733621,1.631720176857735e-8,1.3102715395072806,78,8.325102943151708e-9,5.405972443097712e-15 52 | crypto.randomBytes,Y,N,Y,N,Y,4096,buffer,1810660.874891535,2.8713217664050792e-8,5.522845353688352e-7,5.9654461710027816e-9,1.0801399983106255,89,3.043594985205501e-9,8.244488686231585e-16 53 | crypto.randomBytes,Y,N,Y,Y,Y,4096,buffer,1708659.0153443424,3.243560617508497e-8,5.852542789518903e-7,6.592294731401149e-9,1.1263983824615584,93,3.363415679286301e-9,1.0520685479452102e-15 54 | crypto.randomBytes,Y,N,Y,N,N,4096,buffer,1179572.8281747976,6.115474165863655e-8,8.477645263729428e-7,1.4028937395611244e-8,1.6548153360028337,73,7.1576211202098185e-9,3.739902427334577e-15 55 | crypto.randomBytes,Y,N,Y,Y,N,4096,buffer,1084560.1421048115,7.542148929292155e-8,9.220327773241738e-7,1.718443728005498e-8,1.863755573844765,74,8.767570040844378e-9,5.68840104716228e-15 56 | crypto.randomBytes,Y,N,Y,N,Y,65536,hex,1238793.8990522244,2.6119113657948707e-8,8.072367814897049e-7,5.396264788763426e-9,0.6684859897990473,90,2.7531963207976665e-9,6.822080982768427e-16 57 | crypto.randomBytes,Y,N,Y,Y,Y,65536,hex,1162036.7155551054,2.828493269007242e-8,8.60558007000923e-7,5.8115305451537914e-9,0.6753211867038682,91,2.965066604670302e-9,8.000374172819275e-16 58 | crypto.randomBytes,Y,N,Y,N,N,65536,hex,937338.471839561,4.8193817834922e-8,0.0000010668504814887875,1.0764702714026643e-8,1.0090169991772908,77,5.4921952622584914e-9,2.322644077505646e-15 59 | crypto.randomBytes,Y,N,Y,Y,N,65536,hex,910588.4001063277,5.8334334746019165e-8,0.0000010981910157028487,1.3202302796495866e-8,1.2021863781180466,75,6.7358687737223805e-9,3.402894610260619e-15 60 | crypto.randomBytes,Y,N,Y,N,Y,65536,buffer,1907768.2929375411,2.285791338234064e-8,5.241726700784094e-7,4.888245520821603e-9,0.9325639812717411,84,2.4940028167457156e-9,5.224842041945873e-16 61 | crypto.randomBytes,Y,N,Y,Y,Y,65536,buffer,1789604.0696967093,1.581606300031761e-8,5.587828151114305e-7,3.2676324695843763e-9,0.5847768365841308,90,1.6671594232573348e-9,2.501478488300156e-16 62 | crypto.randomBytes,Y,N,Y,N,N,65536,buffer,1359016.5233681265,5.4178809771307494e-8,7.35826226396162e-7,1.2261818959088459e-8,1.6664014571949777,75,6.256030081167581e-9,2.9353434282355247e-15 63 | crypto.randomBytes,Y,N,Y,Y,N,65536,buffer,1349288.275007342,3.9563572082279906e-8,7.411314679915666e-7,8.83702746334615e-9,1.1923697542210834,77,4.5086874812990566e-9,1.565276235909758e-15 64 | crypto.randomFillSync,Y,N,Y,Y,Y,,hex,297033.8243031721,4.961860623819907e-7,0.0000033666199542962983,1.0194828777600817e-7,3.028208979926804,91,5.2014432538779675e-8,2.4620060850214477e-13 65 | crypto.randomFillSync,Y,N,Y,Y,Y,,buffer,352825.59972600144,8.233700959252105e-8,0.0000028342614616869738,1.6557293925801438e-8,0.5841837159210573,95,8.447598941735428e-9,6.779383148638903e-15 66 | crypto.randomFillSync,Y,N,Y,N,Y,256,hex,972593.4155446362,1.0913918396663004e-7,0.0000010281788710650653,2.2674711511529384e-8,2.2053275115487643,89,1.1568730363025196e-8,1.1911361476901917e-14 67 | crypto.randomFillSync,Y,N,Y,Y,Y,256,hex,1003554.8320736554,6.09838678921799e-8,9.964577599947278e-7,1.252997894322087e-8,1.257452091425046,91,6.392846399602485e-9,3.719032143090851e-15 68 | crypto.randomFillSync,Y,N,Y,N,Y,256,buffer,1533437.2957510056,2.951641699438113e-8,6.521296976217387e-7,6.132318530127828e-9,0.9403525943522999,89,3.1287339439427696e-9,8.712188721861912e-16 69 | crypto.randomFillSync,Y,N,Y,Y,Y,256,buffer,1498400.6224011534,2.6567020562122992e-8,6.673782598925529e-7,5.519553152891406e-9,0.8270501879668731,89,2.8160985473935748e-9,7.058065815482659e-16 70 | crypto.randomFillSync,Y,N,Y,N,Y,4096,hex,1299413.173994608,5.0179788391876076e-8,7.695781603674503e-7,1.0253944990559241e-8,1.3324111206148694,92,5.2316045870200214e-9,2.518011163053461e-15 71 | crypto.randomFillSync,Y,N,Y,Y,Y,4096,hex,1277688.454502037,3.526138399561669e-8,7.826634078725689e-7,7.325890487163e-9,0.9360205694394469,89,3.737699228144388e-9,1.2433652012863328e-15 72 | crypto.randomFillSync,Y,N,Y,N,Y,4096,buffer,2127691.6077754805,2.6915996588915895e-8,4.699929239489309e-7,5.5609025080007395e-9,1.1831885597930796,90,2.8371951571432346e-9,7.244708723745321e-16 73 | crypto.randomFillSync,Y,N,Y,Y,Y,4096,buffer,2030611.1132954152,1.920357031971543e-8,4.924625859932044e-7,3.86167969643151e-9,0.7841569707561091,95,1.9702447430773013e-9,3.6877711302425544e-16 74 | crypto.randomFillSync,Y,N,Y,N,Y,65536,hex,1411415.2183490742,2.0709318516298132e-8,7.085087272685746e-7,5.1970507955921925e-9,0.7335196583431984,61,2.6515565283633635e-9,4.288758734094886e-16 75 | crypto.randomFillSync,Y,N,Y,Y,Y,65536,hex,1351733.4616031593,3.372069840274245e-8,7.397908155754297e-7,8.2615711086719e-9,1.1167442113005717,64,4.2150873003428065e-9,1.1370855007687173e-15 76 | crypto.randomFillSync,Y,N,Y,N,Y,65536,buffer,2173932.1524281814,2.100438573594189e-8,4.59995956581739e-7,4.315641498042623e-9,0.938191181094818,91,2.2018579071646036e-9,4.411842201442391e-16 77 | crypto.randomFillSync,Y,N,Y,Y,Y,65536,buffer,1978253.4926006168,4.35350863642506e-8,5.05496390498165e-7,9.044831453391888e-9,1.7892969412656414,89,4.614709925199943e-9,1.8953037447427583e-15 78 | crypto.randomFill,Y,N,Y,Y,N,,hex,35752.807680144644,0.0000020083356471665353,0.00002796983131915961,4.5758998250477377e-7,1.636012664085393,74,2.334642767881499e-7,4.033412071679825e-12 79 | crypto.randomFill,Y,N,Y,Y,N,,buffer,40443.00734214982,0.0000018910302968355882,0.000024726153313475213,4.2515546125360265e-7,1.7194565441034542,76,2.1691605166000136e-7,3.5759955835500926e-12 80 | crypto.randomFill,Y,N,Y,N,N,256,hex,337253.4368482959,2.378239180432692e-7,0.000002965129160269528,5.6116045105364475e-8,1.8925329074118165,69,2.863063525783902e-8,5.6560215993451615e-14 81 | crypto.randomFill,Y,N,Y,Y,N,256,hex,342600.8605484592,1.9655986341257626e-7,0.0000029188484769102174,4.4785255187298465e-8,1.5343466967050803,74,2.2849619993519626e-8,3.863577990477064e-14 82 | crypto.randomFill,Y,N,Y,N,N,256,buffer,394035.6155777617,1.9892930719593942e-7,0.0000025378416581296394,4.563451207728267e-8,1.7981623057962879,73,2.328291432514422e-8,3.957286926145643e-14 83 | crypto.randomFill,Y,N,Y,Y,N,256,buffer,398759.1274338314,1.695397807940821e-7,0.0000025077795872294766,3.889253566145895e-8,1.5508753584052544,73,1.9843130439519874e-8,2.874373727170541e-14 84 | crypto.randomFill,Y,N,Y,N,N,4096,hex,838636.8924523705,8.317656749208788e-8,0.0000011924111722246872,1.8824629343675796e-8,1.5787028654347977,75,9.604402726365201e-9,6.91834137976585e-15 85 | crypto.randomFill,Y,N,Y,Y,N,4096,hex,795834.2891605515,6.68320697148972e-8,0.0000012565429934601123,1.4927793533772774e-8,1.1880049955685532,77,7.616221190700395e-9,4.4665255423768786e-15 86 | crypto.randomFill,Y,N,Y,N,N,4096,buffer,1099978.5603171047,1.7147299670973272e-7,9.091086281824598e-7,3.9336016646208265e-8,4.3268774959105825,73,2.006939624806544e-8,2.9402988600616004e-14 87 | crypto.randomFill,Y,N,Y,Y,N,4096,buffer,1124590.2491774398,7.454464629782256e-8,8.892127605867391e-7,1.7218934800125383e-8,1.9364246177443094,72,8.785170816390502e-9,5.556904291667472e-15 88 | crypto.randomFill,Y,N,Y,N,N,65536,hex,910602.1870692471,8.335721610189546e-8,0.0000010981743885532251,1.8618895342123535e-8,1.6954406819351109,77,9.499436399042621e-9,6.948425476258098e-15 89 | crypto.randomFill,Y,N,Y,Y,N,65536,hex,899566.8115933354,5.608904774699467e-8,0.000001111646169147542,1.24476347636685e-8,1.1197479116231634,78,6.350834063096173e-9,3.1459812771646474e-15 90 | crypto.randomFill,Y,N,Y,N,N,65536,buffer,1379133.5131785765,4.040959202084486e-8,7.250929590531351e-7,9.02599678634076e-9,1.2448054657884673,77,4.6051004011942655e-9,1.6329351272911285e-15 91 | crypto.randomFill,Y,N,Y,Y,N,65536,buffer,1356052.45407395,3.5626241326434876e-8,7.374346007012696e-7,8.11727420577043e-9,1.1007449607126165,74,4.141466431515526e-9,1.269229071049376e-15 92 | /dev/random,Y,N,Y,Y,N,,hex,40092.15629817326,0.000001817197163071157,0.0000249425347083555,4.168662076689083e-7,1.671306515328862,73,2.126868406474022e-7,3.3022055294738614e-12 93 | /dev/random,Y,N,Y,Y,Y,,hex,226814.16692417953,1.0131910610072831e-7,0.00000440889567684846,2.0268042409905055e-8,0.4597079154386555,96,1.0340837964237272e-8,1.026556126105064e-14 94 | /dev/random,Y,N,Y,Y,N,,buffer,41102.927153142,0.000002239006222432206,0.000024329167513403184,5.033899905468379e-7,2.069080211106752,76,2.5683162783001937e-7,5.013148864090137e-12 95 | /dev/random,Y,N,Y,Y,Y,,buffer,262087.29609973173,1.2382563987521927e-7,0.000003815522594500236,2.5166636595458834e-8,0.6595855737228363,93,1.2840120711968794e-8,1.533278909050749e-14 96 | /dev/random,Y,N,Y,N,N,256,hex,234065.6169955903,2.4631917690328756e-7,0.000004272306256834124,5.501852377020588e-8,1.287794471245979,77,2.8070675392962185e-8,6.067313691031306e-14 97 | /dev/random,Y,N,Y,Y,N,256,hex,235687.26352186356,3.104959351248625e-7,0.000004242910648021652,7.027184539683658e-8,1.6562178944211878,75,3.585298234532479e-8,9.640772572906284e-14 98 | /dev/random,Y,N,Y,Y,Y,256,hex,443135.29624381365,9.482989594208446e-8,0.0000022566471424785777,1.981344571184479e-8,0.878003713512906,88,1.01089008733902e-8,8.992709164386566e-15 99 | /dev/random,Y,N,Y,N,N,256,buffer,269160.8490043337,2.415133298785834e-7,0.000003715250578600676,5.578673301266939e-8,1.5015604420868185,72,2.8462618884014994e-8,5.832868850904144e-14 100 | /dev/random,Y,N,Y,Y,N,256,buffer,267477.6044201202,2.624756391983058e-7,0.000003738630761883622,6.062877942864256e-8,1.6216840680489175,72,3.0933050728899266e-8,6.889346117255918e-14 101 | /dev/random,Y,N,Y,Y,Y,256,buffer,525963.3440456088,5.4555412746109045e-8,0.0000019012731805760313,1.114807812394886e-8,0.586348044975384,92,5.687794961198399e-9,2.9762930598983173e-15 102 | /dev/random,Y,N,Y,N,N,4096,hex,381098.7893996222,1.8016693862707142e-7,0.000002623991541866051,4.0242579242422166e-8,1.5336398231605453,77,2.053192818490927e-8,3.246012577425092e-14 103 | /dev/random,Y,N,Y,Y,N,4096,hex,388474.2325561808,1.7339330983422317e-7,0.0000025741733072485852,3.8729603024187257e-8,1.5045452812026685,77,1.9760001542952682e-8,3.006523989526691e-14 104 | /dev/random,Y,N,Y,Y,Y,4096,hex,491755.997728609,6.035911519716947e-8,0.000002033528832630286,1.2267539412042234e-8,0.6032636083243862,93,6.2589486796133846e-9,3.643222787385175e-15 105 | /dev/random,Y,N,Y,N,N,4096,buffer,454175.0242077443,1.2552275704599894e-7,0.000002201794345130237,2.822095751666079e-8,1.2817254063295138,76,1.4398447712582036e-8,1.5755962536428876e-14 106 | /dev/random,Y,N,Y,Y,N,4096,buffer,448019.8866406063,1.3108826440057167e-7,0.0000022320437771151497,2.9280232589237864e-8,1.3118126485440933,77,1.4938894178182584e-8,1.7184133063554184e-14 107 | /dev/random,Y,N,Y,Y,Y,4096,buffer,574019.8642746658,5.4983101650537754e-8,0.000001742099990326301,1.1115304888604027e-8,0.6380405803528013,94,5.671073922757157e-9,3.0231414671133676e-15 108 | /dev/random,Y,N,Y,N,N,65536,hex,409728.1389904152,1.6003339355377853e-7,0.000002440642720961357,3.621896655626051e-8,1.4839929763252706,75,1.8479064569520668e-8,2.5610687052338564e-14 109 | /dev/random,Y,N,Y,Y,N,65536,hex,450288.89253284317,1.0475128747880272e-7,0.0000022207965077154596,2.903557551999889e-8,1.307439714495403,50,1.4814069142856577e-8,1.097283222846677e-14 110 | /dev/random,Y,N,Y,Y,Y,65536,hex,541220.0866165819,5.252591383971029e-8,0.0000018476771737195943,1.9264090408842414e-8,1.0426112679663355,31,9.433932619413524e-9,2.7589716246966696e-15 111 | /dev/random,Y,N,Y,N,N,65536,buffer,483238.653748318,1.2160499696452896e-7,0.0000020693708838134942,2.7707135762888573e-8,1.3389158985280152,74,1.4136293756575803e-8,1.4787775286743097e-14 112 | /dev/random,Y,N,Y,Y,N,65536,buffer,525563.0037134768,9.668755136732252e-8,0.0000019027214490637432,2.7072514382850307e-8,1.4228311977127108,49,1.3812507338188932e-8,9.348482589408632e-15 113 | /dev/random,Y,N,Y,Y,Y,65536,buffer,636140.5873853738,2.486044826891152e-8,0.0000015719795589684648,1.1982797144307255e-8,0.7622743613899396,19,5.703377983963472e-9,6.180418881312258e-16 114 | /dev/urandom,Y,Y,Y,Y,N,,hex,39507.04422085894,0.0000014358808676056339,0.000025311941698539418,3.228253897325965e-7,1.275387694778171,76,1.647068314962227e-7,2.061753865955908e-12 115 | /dev/urandom,Y,Y,Y,Y,Y,,hex,225501.42515132052,2.573057708071737e-7,0.000004434561774183732,5.147187411867246e-8,1.1606980968970009,96,2.6261160264628807e-8,6.620625969067381e-14 116 | /dev/urandom,Y,Y,Y,Y,N,,buffer,42674.86959117307,0.0000016573875892406075,0.000023432994865128808,3.7510212295344695e-7,1.6007434180410514,75,1.9137863415992192e-7,2.7469336209687926e-12 117 | /dev/urandom,Y,Y,Y,Y,Y,,buffer,262925.0319885802,1.002083437907476e-7,0.000003803365516157601,2.004584367096601e-8,0.5270554088426815,96,1.0227471260696944e-8,1.0041712165284664e-14 118 | /dev/urandom,Y,Y,Y,N,N,256,hex,242489.65283460089,2.3004698981247398e-7,0.000004123887301212342,5.172087101269151e-8,1.2541776056170737,76,2.638819949627118e-8,5.2921617521780506e-14 119 | /dev/urandom,Y,Y,Y,Y,N,256,hex,247782.5182375925,2.2637738546728651e-7,0.0000040357972269905045,5.1579039590120037e-8,1.2780384317916424,74,2.6315836525571446e-8,5.1246720651004426e-14 120 | /dev/urandom,Y,Y,Y,Y,Y,256,hex,449218.54401750246,6.334568535017832e-8,0.0000022260879772608807,1.2738295165987008e-8,0.5722278407729873,95,6.499130186728065e-9,4.012675852483797e-15 121 | /dev/urandom,Y,Y,Y,N,N,256,buffer,260614.98900655247,2.416974963670799e-7,0.000003837077843496015,5.544556240850185e-8,1.4449944637553827,73,2.8288552249235635e-8,5.841767975011461e-14 122 | /dev/urandom,Y,Y,Y,Y,N,256,buffer,268182.0332231612,2.674662104585928e-7,0.000003728810569378726,6.094093820275491e-8,1.634326471374183,74,3.1092315409568835e-8,7.153817373708025e-14 123 | /dev/urandom,Y,Y,Y,Y,Y,256,buffer,529952.4027028044,3.112612595830021e-8,0.0000018869619137490667,6.395292990124589e-9,0.3389200886104929,91,3.2629045867982597e-9,9.688357171719701e-16 124 | /dev/urandom,Y,Y,Y,N,N,4096,hex,393407.06632211595,1.5340679312600587e-7,0.0000025418963857177254,3.519161782808852e-8,1.3844631128877378,73,1.7954907055147206e-8,2.353364417720516e-14 125 | /dev/urandom,Y,Y,Y,Y,N,4096,hex,386528.09411239834,1.2506559082861534e-7,0.000002587134066661686,2.775534366636536e-8,1.0728220088794829,78,1.4160889625696612e-8,1.5641402009310632e-14 126 | /dev/urandom,Y,Y,Y,Y,Y,4096,hex,489407.18930024316,7.087038523929667e-8,0.0000020432883330336953,1.4481946915127684e-8,0.7087568935327967,92,7.3887484260855534e-9,5.02261150396632e-15 127 | /dev/urandom,Y,Y,Y,N,N,4096,buffer,450002.3482370343,1.3072694843760703e-7,0.0000022222106260504665,2.9988846748590396e-8,1.349505145778623,73,1.5300432014586936e-8,1.7089535047808765e-14 128 | /dev/urandom,Y,Y,Y,Y,N,4096,buffer,446349.01258873066,1.5095505426644078e-7,0.0000022403992655886247,3.3500896462252644e-8,1.4953092056763768,78,1.7092294113394206e-8,2.2787428408584084e-14 129 | /dev/urandom,Y,Y,Y,Y,Y,4096,buffer,573550.1386868071,6.121187727277235e-8,0.0000017435267338433337,1.2576826623376731e-8,0.7213440654077653,91,6.416748277233026e-9,3.746893919256944e-15 130 | /dev/urandom,Y,Y,Y,N,N,65536,hex,416023.9979075076,1.5874516419764897e-7,0.00000240370749050473,3.5690265575950335e-8,1.4848006971287553,76,1.820931917140323e-8,2.5200027156138533e-14 131 | /dev/urandom,Y,Y,Y,Y,N,65536,hex,445563.4723985934,1.0604497041952198e-7,0.0000022443491487682303,2.9104561377600026e-8,1.2967929430041456,51,1.4849266008979605e-8,1.124553575127729e-14 132 | /dev/urandom,Y,Y,Y,Y,Y,65536,hex,539710.2799441398,4.373940926503079e-8,0.0000018528459382013262,1.515493211923452e-8,0.8179272656606497,32,7.732108224099245e-9,1.9131359228538614e-15 133 | /dev/urandom,Y,Y,Y,N,N,65536,buffer,492678.7919680125,1.458062750006103e-7,0.0000020297200048037093,3.391588171277748e-8,1.6709635630781217,71,1.7304021282029328e-8,2.1259469829553595e-14 134 | /dev/urandom,Y,Y,Y,Y,N,65536,buffer,479059.070678908,1.243408987635906e-7,0.0000020874252492136934,2.8330498325881305e-8,1.3571982199867059,74,1.4454335880551686e-8,1.546065910533749e-14 135 | /dev/urandom,Y,Y,Y,Y,Y,65536,buffer,637976.163460246,2.1825659912773176e-8,0.000001567456681416143,1.0214605874484991e-8,0.6516675067062426,20,4.880365921875295e-9,4.763594306280341e-16 136 | hyperid cold start,Y,Y,N,N,Y,,other,102478.35151996011,4.7517557886467193e-7,0.000009758158529757635,9.872228082056006e-8,1.0116896596781568,89,5.036851062273472e-8,2.2579183074937603e-13 137 | hyperid normal,Y,Y,N,N,Y,,other,8495557.807467975,1.249181382129973e-8,1.1770857460600825e-7,2.687463212046943e-9,2.283149907338837,83,1.3711547000239506e-9,1.5604541254601493e-16 138 | cuid,Y,Y,N,N,Y,,other,448944.8114253857,7.07544284926285e-8,0.000002227445277349417,1.4783196943161006e-8,0.6636839563911756,88,7.542447419980105e-9,5.0061891513184796e-15 139 | shortid,N,Y,Y,N,Y,,other,22551.883955968962,0.00000729196808687398,0.00004434219340399378,0.0000015880286055858889,3.581303683193217,81,8.102186763193311e-7,5.317279857998857e-11 140 | nanoid,Y,N,Y,N,Y,,other,237372.57768148824,2.700978936852065e-7,0.000004212786539066118,5.7085793628467255e-8,1.3550601982582748,86,2.9125404912483293e-8,7.295287217318513e-14 141 | --------------------------------------------------------------------------------