This file contains hidden or 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
const Benchmark = require('benchmark').Benchmark; | |
const suite = new Benchmark.Suite; | |
const users = new Array(50).fill().map(gen); | |
const logins = new Array(10).fill().map(gen); | |
function random(min, max) { | |
return Math.floor(Math.random() * (max - min)) + min; | |
} |
This file contains hidden or 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
html,body { | |
min-height: 100%; | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
display: flex; | |
flex-direction: column; |
This file contains hidden or 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
.a { | |
display: flex; | |
width: 100%; | |
height: 200px; | |
} | |
.b { | |
background: blue; | |
min-width: 100px; | |
min-height: 100%; |
This file contains hidden or 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
const Benchmark = require('benchmark').Benchmark; | |
const suite = new Benchmark.Suite(); | |
function uid() { | |
return 'xxx'.replace(/x/g, function(c) { | |
return Math.floor(Math.random()*10); | |
}); | |
} | |
const count = 100; |
This file contains hidden or 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
html, body { | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
.one { | |
background-color: yellow; | |
width: 200px; | |
height: 100px; | |
margin-top: 10%; |
This file contains hidden or 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
@font-face | |
{ | |
font-family: 'Open Sans'; | |
font-weight: normal; | |
src: local('Open Sans'); | |
src: url(data:application/octet-stream;base64,d09GRgABAAAAAPjgABIAAAABnwwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABlAAAABwAAAAcXcVGfkdERUYAAAGwAAAAHgAAACAD3gADR1BPUwAAAdAAAAAgAAAAIGyRdI9HU1VCAAAB8AAAAb8AAAKKSI+4209TLzIAAAOwAAAAXwAAAGChNp7WY21hcAAABBAAAAMiAAAEfs0qHI1jdnQgAAAHNAAAAEQAAABECwcOSmZwZ20AAAd4AAABsQAAAmUPtC+nZ2FzcAAACSwAAAAIAAAACAAAABBnbHlmAAAJNAAAz9oAAVocaDlL+GhlYWQAANkQAAAAMwAAADb6fLBQaGhlYQAA2UQAAAAhAAAAJA3MCX1obXR4AADZaAAABzkAAA6881I+gmxvY2EAAOCkAAAHMwAAB2R3/NCSbWF4cAAA59gAAAAgAAAAIATnAq1uYW1lAADn+AAAAPUAAAG+JThAUXBvc3QAAOjwAAAPFgAAH3APmSRLcHJlcAAA+AgAAADYAAABfMhgFiwAAAABAAAAAMmJbzEAAAAAyTUxiwAAAADLBqXBeNpjYGRgYOADYgkGEGBiAPKZNwBJFjCPAQAL8QDlAAAAAQAAAAoAHAAeAAFsYXRuAAgABAAAAAD//wAAAAAAAHjaXVJNaxNRFD1vTpM0g4tAkqqxFHFRsijFKmTZlRRSkkwRKV0FgtCiTBNlJkaEfmptq7b18wfEfqlV202LS3+DC7dSiiAiIhKki0J638uAKMOcc9+95368OwMFwMYVfIZyS34Z7YjByju5s0hfdvKCQLOJqKgUiDaEEEZEVFHjt43f+i9iu9fGSuh3y9VxXHIrV10MVrQ9dEPjiFdyfRQ9 |
This file contains hidden or 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
.a { | |
display: flex; | |
flex-flow: column nowrap; | |
width: 200px; | |
height: 200px; | |
background: yellow; | |
border: 1px solid #999; | |
padding: 5px; | |
box-sizing: border-box; | |
} |
This file contains hidden or 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
items[ Math.floor(Math.random() * items.length) ] | |
items[ ~~(Math.random() * items.length) ] | |
items[ Math.random() * items.length >>> 0 ] |
This file contains hidden or 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
const Benchmark = require('benchmark').Benchmark; | |
const siphash = require('siphash'); | |
const murmur = require('murmur'); | |
const HASH_KEY = siphash['string16_to_key']('A054ED26FF2BC196'); | |
const suite = new Benchmark.Suite('Generate Hash'); | |
var hash; |
This file contains hidden or 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
const Benchmark = require('benchmark').Benchmark; | |
const suite = new Benchmark.Suite(); | |
function uid() { | |
return 'xxx'.replace(/x/g, function(c) { | |
return Math.floor(Math.random()*10); | |
}); | |
} | |
const count = 100; |
NewerOlder