Vincent Foley <vinfoley / iquebec.com> wrote in message news:<zDFj9.23405$32.432775 / weber.videotron.net>...
> In my experience, Python is faster than Ruby.  I made a small script to
> help me do crossword puzzles.  The first thing I do, is open a
> dictionary file and put it in memory:
> 
> Ruby: _wordList = open('/home/vince/fr_dict.txt', 'r').read.split('\n')
> Python: _wordList = (open('/home/vince/fr_dict.txt', 'r').read()).split('\n')
> 
> Same thing really. Here are the outputs of time:
> Ruby:
> ruby/crosswords.rb  1.52s user 0.13s system 68% cpu 2.407 total
> 
> Python:
> python/crossword.py  0.52s user 0.07s system 31% cpu 1.875 total
> 
> Python went over that file much more quickly.  Maybe my technique for
> opening a file in Ruby could be accelerated, but I think that the speed
> of the Python interpreter is just greater than that of Ruby, that's all.
> 
> Vince


Tests need to be timed internally from Start of Action to End of Action.
The tests above include the time to load the interpreter.
Perhaps the Python interpreter loads faster.