From Bitty Terrapin, 9 Years ago, written in Plain Text.
Embed
  1. longneck@mofa ~ $ cat test.py
  2. print 'start'
  3. for i in range(50 * 1000 * 1000):
  4.     if 1 == 1:
  5.         i
  6. print 'end'
  7. longneck@mofa ~ $ time python test.py
  8. start
  9. end
  10.  
  11. real    0m4.108s
  12. user    0m3.576s
  13. sys     0m0.532s
  14. longneck@mofa ~ $ cat test.coffee
  15. console.log 'start'
  16. for i in [1..50 * 1000 * 1000]
  17.     if 1 == 1
  18.         i
  19. console.log 'end'
  20. longneck@mofa ~ $ cat test.js
  21. // Generated by CoffeeScript 1.10.0
  22. (function() {
  23.   var i, j, ref;
  24.  
  25.   console.log('start');
  26.  
  27.   for (i = j = 1, ref = 50 * 1000 * 1000; 1 <= ref ? j <= ref : j >= ref; i = 1 <= ref ? ++j : --j) {
  28.     if (1 === 1) {
  29.       i;
  30.     }
  31.   }
  32.  
  33.   console.log('end');
  34.  
  35. }).call(this);
  36. longneck@mofa ~ $ time node test.js
  37. start
  38. end
  39.  
  40. real    0m0.294s
  41. user    0m0.288s
  42. sys     0m0.008s
  43. longneck@mofa ~ $

Replies to WTF Python... rss

Title Name Language When
Re: WTF Python... Botched Coyote text 9 Years ago.