News for hackers. Stuff that matters.
Re:C++ has become a scripting language by 6ren on Wednesday October 16, 2013 @08:58AM (#6559368)
faster too

  $ time sort < t > t-sh
  real    0m0.016s
  user    0m0.008s
  sys     0m0.008s

  $ time py -c "import sys; open(sys.argv[1],'w').writelines(sorted(open(sys.argv[2]).readlines()))" t-py t
  real    0m0.088s
  user    0m0.056s
  sys     0m0.012s
BTW also a different result (I curled this page for the data).
Re:C++ has become a scripting language by tyrion on Wednesday October 16, 2013 @11:31AM (#6560202)
It is faster mainly because of the startup time of the python interpreter. You can improve performances using the "-S" on the python interpreter. I get inconsistent results with time, I think maybe because of context switching as stated here [1].

See my results here: http://pastebin.com/HMUErzee

1: http://stackoverflow.com/questions/9006596/is-the-unix-time-...

Re:C++ has become a scripting language by rofrol on Wednesday October 16, 2013 @12:36PM (#6560600)