Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Benchmarking with Memory Profiling

by ZZamboni (Curate)
on Jun 10, 2001 at 07:17 UTC ( #87258=note: print w/replies, xml ) Need Help??

in reply to Benchmarking with Memory Profiling

As I told you in the CB I don't have an answer to this , but I'd like to comment on this:
I realise Perl is not considered by some to be the ideal language to learn this in
I don't think this is necessarily true when studying algorithms. When I was taking my algorithms class, I often found that writing a quick perl program was the easiest way of testing an algorithm for a homework, for example. Perl makes it very easy to write things almost in pseudocode, and it has plenty of high-level operations, so that translating things from an algorithm in the book to working code can be relatively painless. And with tools like Benchmark, at least time measuring is easy.


Replies are listed 'Best First'.
Re: Re: Benchmarking with Memory Profiling
by Arguile (Hermit) on Jun 10, 2001 at 07:40 UTC

    I agree with the pseudo coding, often I can just pull the logic example right out of the book and have a working version to play with. I also find it's allowing me to more easily grasp the root concept and not get caught up in the perculiarities of a specific machine/platform as seen in many of the C/C++ answers in the books.

    I only put that in there because I asked a like question in a different forum and got all sorts of "use C++" or "use LISP" answers.

      I only put that in there because I asked a like question in a different forum and got all sorts of "use C++" or "use LISP" answers.
      And that's why I qualified "when studying algorithms". Because there are some things for which other languages may be more appropriate as a studying ground. For example, if you are studying programming languages theory, it might be better to stick with Scheme or LISP so that you can more easily translate your Lambda calculus and tail recursions and continuations into working code... (and no, I don't want to reopen the "Lisp vs Perl" discussion :-)


Re^2: Benchmarking with Memory Profiling
by shiza (Hermit) on Jun 14, 2005 at 18:31 UTC
    valgrind ( may be of use.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://87258]
usemodperl laughs, at you
usemodperl can see the monastery has become a rehab for children of the serpent :-)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2018-06-24 09:11 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.