FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-09-2008, 02:00 PM
"Jordi Gutiérrez Hermoso"
 
Default C++ programming: keeping count of data items read from file

On 09/05/2008, Ron Johnson <ron.l.johnson@cox.net> wrote:
> Then write your apps in FORTRAN. (But then, you aren't the OP...)

Sometimes I do, as a matter of fact, but I feel more comfortable with C++.

> > You're not going to convince a numericist to give up compiled
> > languages. :-) Give it up.
>
>
> I'm not going to try. Well, not much... Since all the functions
> are already written in a compiled language, what you're really doing
> is using Python as "stitching".

Like I said before, Python and Octave are interpreted languages with
a good numerical slant, but you really get a slowdown from the
interpreter itself. Tricks like vectorisation can sometimes work
around the slowdown, but sometimes code just isn't easily lent to
vectorisation. This is why Octave also provides its C++ libraries for
code that you just can't figure out how to vectorise when the
interpreter is slowing you down. The same remarks apply to Numpy.

I personally reserve interpreted languages for profiling or quickly
testing out ideas, but once I need to actually implement my ideas,
it's C++ (or sometimes, Fortran).

- Jordi G. H.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-10-2008, 12:52 AM
"s. keeling"
 
Default 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.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-10-2008, 03:44 AM
"H.S."
 
Default C++ programming: keeping count of data items read from file

s. keeling wrote:


Yes, and you need to do more research.


and I skipped some other factors as well which contributed to not using
an interpreted language. Perhaps in my next project, I will see how that
goes. For this one, I am using bash, sed, perl and awk and gnuplot for
post processing the results.





--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-10-2008, 03:47 AM
"H.S."
 
Default C++ programming: keeping count of data items read from file

s. keeling wrote:



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.


Interesting. Never had chance to see this kind of applications. Is this
about doing signal processing and pattern recognition with that data?


BTW, is that tera byte denoting one single file?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-10-2008, 08:48 AM
Michelle Konzack
 
Default C++ programming: keeping count of data items read from file

Am 2008-05-06 20:56:09, schrieb Jordi Gutiérrez Hermoso:
> Although it's true that sometimes the C++ Hello World seems bloated to
> the C Hello World, the difference becomes negligible in any project of
> considerable size beyond Hello World. Embedded devices may be a
> different thing, and I understand that it's allowable and encouraged
> to write the hackiest code in embedded devices, even liberally
> sprinkling your C code with ASM.

If you have only 64kByte of ROM then it leave you not another choice...

Currently I am using some 8051 based µControllers and coding with "sdcc"
and some different ARM CPU's... including an PNX6712 GSM-Chip, -- yeah,
WHO needs Symbian, if we can use GNU/Linux?

Thanks, Greetings and nice Day
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant


--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
+49/177/9351947 50, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
 
Old 05-10-2008, 01:35 PM
Ron Johnson
 
Default C++ programming: keeping count of data items read from file

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/09/08 22:47, H.S. wrote:
> s. keeling wrote:
>
>>
>> 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.
>
> Interesting. Never had chance to see this kind of applications. Is this
> about doing signal processing and pattern recognition with that data?

Maybe. What I do know is that Perl's regex functionality has been
*highly* optimized over the years. So, if the task is pattern
matching over large datasets, Perl is the language to use, even over
compiled languages.

> BTW, is that tera byte denoting one single file?

Probably not. A monolithic TB-range file would be too unwieldy to
manage. Doesn't matter, though.

It would be impressive, though!!!!

- --
Ron Johnson, Jr.
Jefferson LA USA

We want... a Shrubbery!!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIJaSdS9HxQb37XmcRAo+BAJsHT2Md7ONlbl+uPJv0qg qcrIjWiACdEcci
IB5+GWzEeQ3VpcwGmO5nmHY=
=pb9r
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org