ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since b5276fc was
c12869e,
checked in by Peter A. Buhr <pabuhr@…>, 5 years ago
|
update benchmarks for concurrency paper
|
-
Property mode set to
100644
|
File size:
480 bytes
|
Rev | Line | |
---|
[a21dec4] | 1 | var times = 50000000 |
---|
| 2 | var argc = process.argv.length // node, path |
---|
| 3 | if ( argc > 3 ) process.exit( 1 ) |
---|
| 4 | if ( argc == 3 ) times = Number( process.argv[2] ) |
---|
| 5 | |
---|
[c12869e] | 6 | function * coroutine() { yield } |
---|
[a21dec4] | 7 | var hrstart = process.hrtime() |
---|
| 8 | for ( var i = 0; i < times; i += 1 ) { |
---|
| 9 | cor = coroutine() |
---|
| 10 | } |
---|
| 11 | hrend = process.hrtime( hrstart ) |
---|
| 12 | var dur = (1000000000 * hrend[0] + hrend[1]) / times |
---|
| 13 | console.log( dur ) |
---|
| 14 | |
---|
| 15 | // Local Variables: // |
---|
| 16 | // tab-width: 4 // |
---|
[c12869e] | 17 | // compile-command: "nodejs node_cor.js" // |
---|
[a21dec4] | 18 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.