- longneck@mofa ~ $ cat test.py
- print 'start'
- for i in range(50 * 1000 * 1000):
- if 1 == 1:
- i
- print 'end'
- longneck@mofa ~ $ time python test.py
- start
- end
- real 0m4.108s
- user 0m3.576s
- sys 0m0.532s
- longneck@mofa ~ $ cat test.coffee
- console.log 'start'
- for i in [1..50 * 1000 * 1000]
- if 1 == 1
- i
- console.log 'end'
- longneck@mofa ~ $ cat test.js
- // Generated by CoffeeScript 1.10.0
- (function() {
- var i, j, ref;
- console.log('start');
- for (i = j = 1, ref = 50 * 1000 * 1000; 1 <= ref ? j <= ref : j >= ref; i = 1 <= ref ? ++j : --j) {
- if (1 === 1) {
- i;
- }
- }
- console.log('end');
- }).call(this);
- longneck@mofa ~ $ time node test.js
- start
- end
- real 0m0.294s
- user 0m0.288s
- sys 0m0.008s
- longneck@mofa ~ $
Stikked
