by babelon5user · 11y ago · 0 comments
(edit) Then I leave the babel 6.0.2 install as is and then run it against a node 4.2.1 binary - the babel 6.0.2 speed is once again 0.55s - no difference.
So I removed both the node 5.0.0 and babel 6.0.2 installs, re-installed node 4.2.1 with npm 2.14.7 and ran the following commands:
npm install babel
npm install babel-cli
npm install babel-preset-es2015
node_modules/.bin/babel -V
6.0.2 (babel-core 6.0.2)
echo "class Foo {}" | time node_modules/.bin/babel --presets es2015
2.55 real, 2.37 user, 0.23 sys
So the babel 6.0.2 speed difference is not due the node version, but may have something to do with the different npm versions and how they install node_modules, or the fact that I installed the modules one at a time.Using Mac OS X 10.9.5 if it matters.
$ uname -v
#94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015
$ node -v
v4.2.1
$ npm -v
2.14.7
$ npm install babel
$ npm install babel-cli
$ npm install babel-preset-es2015
$ node_modules/.bin/babel -V
6.0.2 (babel-core 6.0.2)
$ echo "class Foo {}" | time node_modules/.bin/babel --presets es2015
2.49user 0.12system 0:02.58elapsed 101%CPU
Compared to babel 5.8.23 on same Linux VM: $ babel -V
5.8.23 (babel-core 5.8.24)
$ echo "class Foo {}" | time babel
0.58user 0.02system 0:00.57elapsed 106%CPU