Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I have no idea what you've been smoking, because there's no way you should be getting that kind of discrepency. Either you're using a very old version of ruby, your interpreter is broken, or you've been sniffing glue again.

    For my results, I used ruby 1.6.7 and perl 5.8.0 on Mandrake 9. I took the sample text you gave in your journal entry and copied it over and over until I ended up with a 2.4 MB file. I used "bzip-0.21" as the target. Hopefully, I didn't screw up the logic.

    I've provided the exact b

    • by djberg96 (2603) on 2003.01.15 8:56 (#16025) Journal
      Oops - those were the benchmarks against the 48k file. Here are the benchmarks against the 2.4mb file:

      Ruby:

      djberge>/usr/local/bin/ruby ruby_bench.rb
            user     system      total        real
      original:270.560000   2.740000 273.300000 (273.258903)
      optimized:134.710000   1.890000 136.600000 (136.578120)

      Perl:

      djberge>perl perl_bench.pl
      Benchmark: timing 1 iterations of original...
        original: 129 wallclock secs (127.60 usr +  1.07 sys = 128.67 CPU) @  0.01/s (n=1)

      So, at the end of the day Perl is still slightly faster - about what I expected.