Operation | nanosec | microsec | millisec | notable | 1Bx |
---|---|---|---|---|---|
L1 cache reference | 0.5 ns |
0.5 s |
|||
Branch mispredict | 5 ns |
5 s |
|||
L2 cache reference | 7 ns |
14x L1 cache | 7 s |
||
Mutex lock/unlock | 25 ns |
25 s |
|||
Main memory reference | 100 ns |
20x L2 cache, 200x L1 cache | 1.6 m |
||
Compress 1K bytes with Zippy | 3,000 ns |
3 µs |
`5 |
This file has been truncated, but you can view the full file.
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
{ | |
"APIGatewayServiceRolePolicy": { | |
"Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy", | |
"AttachmentCount": 0, | |
"CreateDate": "2019-10-22T18:22:01+00:00", | |
"DefaultVersionId": "v6", | |
"Document": { | |
"Statement": [ | |
{ |
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
// sleepsort.js - Sort integers from the commandline in a very ridiculous way: leveraging timeouts :P | |
function sleepSort(array, callback) { | |
var sortedCount = 0, | |
i, len; | |
for ( i = 0, len = array.length; i < len; ++i ) { | |
setTimeout((function(j){ | |
return function() { | |
console.log(array[j]); | |
++sortedCount; |