>>>>> "C" == Charlie  <[email protected]> writes:

  C> In a former life, I once benchmarked C+stdio vs. Perl <FH> and
  C> found no difference at all.  My application (and, therefore, my
  C> test) was line oriented, iirc.

  C> What's more, I tried by-passing stdio in the C program and also
  C> found only a miniscule benefit (especially for larger files where
  C> the buffering actually helps).

c and perl have different stdio libs. also perl does stuff that c's
doesn't do such as flushing on newlines, reading in by lines, etc. yes
you can do those things in c but perl does them most of the time. there
is other overhead too in how things get buffered.

  C> Running sar (on Solaris) on the test programs showed a lot of time
  C> in I/O wait states. Go figure.  At the time I decided to relax and
  C> enjoy <FH>.  :-)

of course in real time stdio will be blocking much of the time. if you
run the benchmark script in file::slurp (and the new version has a much
better script) you can see the real overhead of perl's stdio on files of
differing sizes.

uri

-- 
Uri Guttman  ------  [email protected]  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to