RSS
 

Ruby vs Python vs Windows vs Linux

05 Mar

Nel precedente articolo, ho esaminato le prestazioni di alcuni interpreti ruby e python, su un sistema windows xp. Questa volta, ho eseguito gli stessi script sotto linux: distribuzione ubuntu 9.10 2.6.31-20-generic. Le versioni APT sono state installate tramite gestore di pacchetti, le RVM invece, tramite il Ruby Version Manager e compilate dai sorgenti.

Versione Compilatore/Sistema/VM Secondi
JRuby 1.4.0 APT Java HotSpot(TM) 64-Bit Server VM 1.6.0_16) [amd64-java] 6,1
JRuby 1.4.0 RVM Java HotSpot(TM) 64-Bit Server VM 1.6.0_16) [amd64-java] 6,2
Ruby 1.9.2 preview1 RVM x86_64-linux 6,5
JRuby 1.4.0 Windows Client VM 1.6.0_15 [x86-java] 6,9
Python 2.6.4 Windows 7,5
Ruby 1.9.1 p129 i386-mingw32 8,1
Python 2.6.4 APT x86_64-linux 8,7
Ruby 1.9.1 p378 RVM x86_64-linux 8,7
Ruby 1.9.1 p243 RVM x86_64-linux 8,8
Python 3.1.1 Windows 9,0
Ruby 1.9.1 p243 APT x86_64-linux 9,3
Ruby 1.9.1 p243 i386-mingw32 9,6
Ruby 1.8.7 p249 RVM x86_64-linux 12,2
IronRuby 0.9.3.0 Windows .NET 2.0.0.0 18,9
Ruby 1.9.1 p376 i386-mswin32 20,8
Ruby 1.8.7 p174 APT x86_64-linux 23,0
Ruby 1.8.6 p368 i386-mingw32 23,3
Ruby 1.8.7 p249 i386-mingw32 23,9
IronPython 2.6 Windows .NET 2.0.0.0 256,5
Jython 2.5.1 Windows Client VM 1.6.0_15 [x86-java] Timeout

Win vs Linux

Win vs Linux

 

Tags: , ,

  1. roger

    28 May 2010 at 18:23

    Surprising to see Ruby 1.9.1 p129 i386-mingw32 ahead of its linux counterpart (?)

    Also note that rubinius is fast (maybe pypy is fast, too, or unladden swallow?)

     
  2. roger

    28 May 2010 at 18:28

    Also note that jruby has a new version released now.

     
  3. maurizio

    6 June 2010 at 23:43

    ???

    how can jruby have a better performance than ruby???

     
  4. Marco Mastrodonato

    7 June 2010 at 16:41

    Depends on the virtual machine: JVM is faster than others version. Why are you so surprised?
    Please, let us continue in english section. This is in italian.