It would depend on the version.
Hmm… quite right… Ruby 1.6.7 is three or four times as slow as the
CVS tip (1.7.2 something).
$ ruby16 -v
ruby 1.6.7 (2002-03-01) [i686-linux]
$ time ruby16 -e “a=IO.readlines(‘bigfile’)”
In fact, it’s faster than Perl:
Hmmm, Perl has got slower in 5.x?
I don’t even remember Perl 4.
Perl 5.8.0 seems to be a bit faster than 5.6.1:
$ time perl561 -e “open(F,‘bigfile’);@a=”
$ perl -v
This is perl, v5.8.0 built for i686-linux
$ time perl -e “open(F,‘bigfile’);@a=”
$ ruby -v
ruby 1.7.2 (2002-07-30) [i686-linux]
$ time ruby -e “a=IO.readlines(‘bigfile’)”
On Friday 02 August 2002 12:45 am, email@example.com wrote:
GPG key ID: BEEA7EFE