Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: [flamebait] Use Perl wisely, not cleverly

by l2kashe (Deacon)
on Feb 20, 2003 at 17:14 UTC ( [id://237136]=note: print w/replies, xml ) Need Help??


in reply to Use Perl wisely, not cleverly

Since this is flamebait anyway, I'll pipe up as well with...

Since you talk as if you come from the Java camp, I will hold that assumption.

How much do you really know about Perl?
How long have you been programming?
How long have you been programming Java?
How long have you been programming Perl?
Do you know how to optomize your Java code?
Do you know how to optomize your Perl code?

The reason I ask, there is a Benchmark site (I cant rememeber for the life of me the URL, but it's a thorn in PM 's side), where the author compares I think about 20 languages to each other. If you look at l2kashe's scratchpad, Im pretty sure I have a function which created a hash of X values, and then reiterates and prints that list, thats run a few magnitudes faster than the Perl code from said site. Why? Because I knew simple optimizations.

Anyone can spout numbers to support their view... How does that infamous quote go?

Show me your flowcharts, and I'll remain ignorant of your data set.
Show me your data set and your flowcharts are useless.

Serious paraphrasing on my part, but the thought is there. If you wanna flame perl fine, you wanna remain anonymous, fine, if you want to actually have a conversation, print your code.


/* And the Creator, against his better judgement, wrote man.c */

Replies are listed 'Best First'.
Re:x2 Use Perl wisely, not cleverly (The Great Computer Language Shootout & Fred Brooks)
by grinder (Bishop) on Feb 20, 2003 at 17:51 UTC

    Methinks you must be referring to Doug Bagley's Great Computer Language Shootout. This was a subject of discussion here... aah, I've managed to tease it out of Super Search: Perl speed VS. other languages.

    I wrote to Doug a while back and pointed out that a number of his Perl programs were sub-optimal. For instance, I said that his Fibonacci sequence generator was suboptimal, because a clever (sic) Perl programmer would Memoize the function for a nice speed boost. He replied, and I quote (hope you don't mind Doug) I do not allow caching for those tests because they are supposed to be done in the "same way", as I define in the methodology page.

    I fully accept this point of view, even thougth I don't agree with it. But it's hard to know to know where to draw the line, to figure out what it is you're supposed to be testing. My personal view would be along the lines of "the end justifies the means", if you get my drift.

    <update>What I mean by this is that I usually consider these comparative programming exercises more an interface issue than an implementation issue. That is, all I care about are the results. If it passes all the regression test, and is fast as well, I don't care if it's written on punch cards, or transmitted by Morse operators. Therefore I find the argument that they are supposed to be done in the "same way" slightly misguided. All that really counts are the verifiable results. And this is why Inline::C is so nice. It's so easy to code the inner inner loops in your slow (sic) Perl program and speed things up by an order of magnitude.</update>

    The flowcharts quote comes from Fred Brooks in The Mythical Man-Month. Recommended reading. The exact quote is "Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won t usually need your flowcharts; they'll be obvious."


    print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'
Re: Re: [flamebait] Use Perl wisely, not cleverly
by Louis_Wu (Chaplain) on Feb 20, 2003 at 18:08 UTC
Re^2: [flamebait] Use Perl wisely, not cleverly
by hv (Prior) on Feb 20, 2003 at 17:54 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://237136]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-28 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found