This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

text mangling

By: a guest on Oct 26th, 2012  |  syntax: None  |  size: 4.37 KB  |  views: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. [donatasp text-mangling]$ ghc -V
  2. The Glorious Glasgow Haskell Compilation System, version 7.4.1
  3. [donatasp text-mangling]$ ghc-pkg latest bytestring
  4. bytestring-0.10.0.1
  5. [donatasp text-mangling]$ head -n1 lorem.txt
  6. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  7. [donatasp text-mangling]$ wc -l lorem.txt # 200000 repeating lines
  8. 200000 lorem.txt
  9. [donatasp text-mangling]$ du -sh lorem.txt
  10. 86M     lorem.txt
  11. [donatasp text-mangling]$ python -V
  12. Python 2.7.3
  13. [donatasp text-mangling]$ time python honzapokorny.py > honzapokorny.py.txt
  14.  
  15. real    0m4.657s
  16. user    0m4.262s
  17. sys     0m0.284s
  18. [donatasp text-mangling]$ wc -l honzapokorny.py.txt
  19. 200001 honzapokorny.py.txt
  20. [donatasp text-mangling]$ tail -n1 honzapokorny.py.txt
  21.  
  22. [donatasp text-mangling]$ node --version
  23. v0.6.18
  24. [donatasp text-mangling]$ time node honzapokorny.js > honzapokorny.js.txt
  25.  
  26. real    0m7.529s
  27. user    0m6.248s
  28. sys     0m1.142s
  29. [donatasp text-mangling]$ wc -l honzapokorny.js.txt
  30. 200001 honzapokorny.js.txt
  31. [donatasp text-mangling]$ tail -n1 honzapokorny.js.txt
  32.  
  33. [donatasp text-mangling]$ ghc --make -O2 honzapokorny
  34. [1 of 1] Compiling Main             ( honzapokorny.hs, honzapokorny.o )
  35. Linking honzapokorny ...
  36. [donatasp text-mangling]$ time ./honzapokorny > honzapokorny.txt
  37.  
  38. real    0m32.420s
  39. user    0m31.425s
  40. sys     0m0.374s
  41. [donatasp text-mangling]$ wc -l honzapokorny.txt
  42. 200000 honzapokorny.txt
  43. [donatasp text-mangling]$ ghc --make -O2 dcoutts
  44. [1 of 1] Compiling Main             ( dcoutts.hs, dcoutts.o )
  45. Linking dcoutts ...
  46. [donatasp text-mangling]$ time ./dcoutts > dcoutts.txt
  47.  
  48. real    0m5.208s
  49. user    0m4.955s
  50. sys     0m0.154s
  51. [donatasp text-mangling]$ diff -u dcoutts.txt honzapokorny.txt
  52. --- dcoutts.txt 2012-10-26 09:22:19.151097380 +0300
  53. +++ honzapokorny.txt    2012-10-26 09:20:42.647965669 +0300
  54. @@ -199997,4 +199997,4 @@
  55.  Lorem Ipsum Dolor Sit Amet, Consectetur Adipisicing Elit, Sed Do Eiusmod Tempor ... omitted
  56.  Lorem Ipsum Dolor Sit Amet, Consectetur Adipisicing Elit, Sed Do Eiusmod Tempor ... omitted
  57.  Lorem Ipsum Dolor Sit Amet, Consectetur Adipisicing Elit, Sed Do Eiusmod Tempor ... omitted
  58. -Lorem Ipsum Dolor Sit Amet, Consectetur Adipisicing Elit, Sed Do Eiusmod Tempor ... omitted
  59. \ No newline at end of file
  60. +Lorem Ipsum Dolor Sit Amet, Consectetur Adipisicing Elit, Sed Do Eiusmod Tempor ... omitted
  61. [donatasp text-mangling]$ wc -l dcoutts.txt
  62. 199999 dcoutts.txt
  63. [donatasp text-mangling]$ time ./emilhedevang > emilhedevang.txt
  64.  
  65. real    0m3.279s
  66. user    0m3.072s
  67. sys     0m0.135s
  68. [donatasp text-mangling]$ wc -l emilhedevang.txt
  69. 200000 emilhedevang.txt
  70. [donatasp text-mangling]$ tail -n1 emilhedevang.txt
  71. Lorem Ipsum Dolor Sit Amet, Consectetur Adipisicing Elit, Sed Do Eiusmod Tempor Incididunt Ut Labore Et Dolore Magna Aliqua. Ut Enim Ad Minim Veniam, Quis Nostrud Exercitation Ullamco Laboris Nisi Ut Aliquip Ex Ea Commodo Consequat. Duis Aute Irure Dolor In Reprehenderit In Voluptate Velit Esse Cillum Dolore Eu Fugiat Nulla Pariatur. Excepteur Sint Occaecat Cupidatat Non Proident, Sunt In Culpa Qui Officia Deserunt Mollit Anim Id Est Laborum.
  72. [donatasp text-mangling]$ ghc-pkg latest word8
  73. word8-0.0.2
  74. [donatasp text-mangling]$ ghc --make -O2 emilhedevang-word8
  75. [1 of 1] Compiling Main             ( emilhedevang-word8.hs, emilhedevang-word8.o )
  76. Linking emilhedevang-word8 ...
  77. [donatasp text-mangling]$ time ./emilhedevang-word8 > emilhedevang-word8.txt
  78.  
  79. real    0m1.354s
  80. user    0m1.177s
  81. sys     0m0.138s
  82. [donatasp text-mangling]$ rm emilhedevang.txt
  83. [donatasp text-mangling]$ wc -l emilhedevang-word8.txt
  84. 200000 emilhedevang-word8.txt
  85. [donatasp text-mangling]$ tail -n1 emilhedevang-word8.txt
  86. Lorem Ipsum Dolor Sit Amet, Consectetur Adipisicing Elit, Sed Do Eiusmod Tempor Incididunt Ut Labore Et Dolore Magna Aliqua. Ut Enim Ad Minim Veniam, Quis Nostrud Exercitation Ullamco Laboris Nisi Ut Aliquip Ex Ea Commodo Consequat. Duis Aute Irure Dolor In Reprehenderit In Voluptate Velit Esse Cillum Dolore Eu Fugiat Nulla Pariatur. Excepteur Sint Occaecat Cupidatat Non Proident, Sunt In Culpa Qui Officia Deserunt Mollit Anim Id Est Laborum.
clone this paste RAW Paste Data