Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 23rd, 2013  |  syntax: JavaScript  |  size: 0.65 KB  |  views: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Benchmark source http://spion.github.io/posts/analysis-generators-and-other-async-patterns-node.html
  2. $ node performance.js -t 1 -n 10000 ./examples/promiseishQ.js
  3. benchmarking ./examples/promiseishQ.js
  4. {"time":14438,"mem":516.59375,"errors":0,"lastErr":null}
  5.  
  6. results for 10000 parallel executions, 1 ms per I/O op
  7.  
  8. file            time(ms)  memory(MB)
  9. promiseishQ.js     14438      516.59
  10.  
  11. $ node performance.js -t 1 -n 10000 ./examples/async.js
  12. benchmarking ./examples/async.js
  13. {"time":876,"mem":55.0625,"errors":0,"lastErr":null}
  14.  
  15. results for 10000 parallel executions, 1 ms per I/O op
  16.  
  17. file      time(ms)  memory(MB)
  18. async.js       876       55.06
clone this paste RAW Paste Data