[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] C++ programming: keeping count of data items read from file



H.S. <hs.samix@gmail.com>:
>  s. keeling wrote:
> > Ron Johnson <ron.l.johnson@cox.net>:
> >>  Sorry.  It just seems (to an old C programmer) that this is pretty
> >>  simple problem, unless there's some tricky detail that you aren't
> >>  telling us.
> > 
> > That's exactly what I was thinking looking at the problem.  No offence
> 
>  None taken.
> 
> > meant to the OP, but this sounds like a trivial problem for perl.  We
> > must be missing something.
> 
>  Yes. It is the scale of the problem.
> [snip]
>  The problem may be quite trivial in the languages you mention as far as 
>  the mechanics of reading of lines from a file are concerned. However, 
>  the experiments under question (for which I am writing the code) involve 
>  reading large number of files which may be huge in size (thousands of 
>  lines and many numbers on each line in each file). For that, I very much 

That's almost trivial.  The datasets you see in the petrochemical
industry can be in the terabyte range.  They're so big, they have to
edit in place, not write another output file.  perl handles even this
well.  I/O performance is pretty much hardware bound.  This is binary
data, btw.  Seismic data.

>  Had I been sure to get the same efficiency with Perl or bash or Python 
>  (awk, sed, cut, and so on ... ), I would have taken that route.
> 
>  Like they say, right tool for the right job ....

Yes, and you need to do more research.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)    http://blinkynet.net/comp/uip5.html      Linux Counter #80292
- -    http://www.faqs.org/rfcs/rfc1855.html    Please, don't Cc: me.


Reply to: