----- Original Message -----
From: Bruno Picard
To: Perl
Sent: Tuesday, January 09, 2007 10:29 PM
Subject: [Perldl] benchmark
Hi all!
All the best for this new year!!
A kind of newbie question to start well 2007.
I've looked for some comparison between C and PDL
(and/or Fortran or else) throught the web but I haven't found
any documentation about comparison in term of memory and/or
cpu time consuming.
Does anyone have some inputs on this question
_________________________________________________
My view is that as soon as you use any of the PDL modules you're going to
suffer a measurable (but not terribly significant) hit in terms of both memory
usage and load time.
In terms of performance (once everything has been loaded), I would expect
that the hit is minimal if, indeed, it can even be measured - the "hit" being
the minute amount of time it takes to call the C/fortran routines from perl.
If you have a C function that performs a certain calculation, and that C
function gets called from perl, then there's an additional small amount of time
taken to call that C function (from perl). But that C function runs equally
quickly, irrespective of whether it's called from perl, or from a C application.
Of course, if you're comparing a pure perl function with an equivalent C
function, then the difference can be enormous. (For example, modular
exponentiation algorithms written in C are typically hundreds of times faster
than the same modular exponentiation algorithm written in pure perl.)
Your question was very general ... and so is my response. For a more detailed
reply, you're probably best advised to provide more details regarding the sorts
of calculations that are being undetaken.
Cheers,
Rob
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl