On Friday, 11 April 2003 at  2:37:05 +0900, Daniel Berger wrote:
> Jim Freeze wrote:

Below are the results I get from your benchmarks. I added
the last test which seems to be the fastest, AND is what
I was doing in my tests. To bad perl is 50% faster.

Can this be spead up with a C routine?


      user     system      total        real
      print:  7.680000   6.290000  13.970000 ( 14.107482)
      write:  7.680000   5.870000  13.550000 ( 13.634365)
      syswrite:  7.300000   6.090000  13.390000 ( 13.460545)
      IO.foreach:  2.150000   2.210000   4.360000 (  4.474877)
      File::gets:  2.150000   2.090000   4.240000 (  4.847931)
      File::readline:  2.200000   2.020000   4.220000 (  4.457981)
      File::read:  1.920000   2.160000   4.080000 (  4.214184)
      File::sysread:  2.170000   3.260000   5.430000 (  5.552458)
      File::each:  2.330000   2.040000   4.370000 (  4.375648)
      File::each: <<   1.780000   0.380000   2.160000 (  2.337520)

   x.report("File::each: << "){
     outfile = File.open(outfile9,"a+")
     File.open(outfile1).each{|line|
       outfile << line
     }
     outfile.close
   }



-- 
Jim Freeze
----------
"Life to you is a bold and dashing responsibility"
		-- a Mary Chung's fortune cookie