Skip to content

Instantly share code, notes, and snippets.

@nelhage
Created April 7, 2016 04:38
Show Gist options
  • Save nelhage/207e44508f6b8d7994c9ab7f8f94abc9 to your computer and use it in GitHub Desktop.
Save nelhage/207e44508f6b8d7994c9ab7f8f94abc9 to your computer and use it in GitHub Desktop.
node left-pad
[nelhage@monomorphique:~/code/accidentallyquadratic]$ perf stat node data/left-pad-npm.js 500000
Performance counter stats for 'node data/left-pad-npm.js 500000':
7294.942072 task-clock (msec) # 0.951 CPUs utilized
1,010 context-switches # 0.138 K/sec
15 cpu-migrations # 0.002 K/sec
446,352 page-faults # 0.061 M/sec
19,765,021,583 cycles # 2.709 GHz
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
37,497,528,945 instructions # 1.90 insns per cycle
6,784,841,924 branches # 930.075 M/sec
7,159,163 branch-misses # 0.11% of all branches
7.670671934 seconds time elapsed
[nelhage@monomorphique:~/code/accidentallyquadratic]$ perf stat node data/left-pad-npm.js 250000
Performance counter stats for 'node data/left-pad-npm.js 250000':
1079.494304 task-clock (msec) # 0.926 CPUs utilized
97 context-switches # 0.090 K/sec
4 cpu-migrations # 0.004 K/sec
6,439 page-faults # 0.006 M/sec
2,937,848,777 cycles # 2.722 GHz
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
6,286,215,265 instructions # 2.14 insns per cycle
1,119,087,906 branches # 1036.678 M/sec
1,267,388 branch-misses # 0.11% of all branches
1.166320511 seconds time elapsed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment