in reply to Re: Re: default values
in thread default values

wolis,
I think you are under the misconception that more verbose code automatically means slower code. I doubt seriously that you would be able to notice a significant measurable performance advantage here without millions of calculations. I would take a look at why premature optimization can be a bad thing.

Typically, performance issues are caused by inefficient algorithms as a whole and not individual lines of code. There are cases where an individual line in a tightly wrapped loop can be a problem. Then there are cases where people try to use Perl in a situation better suited for C, not because Perl is incapable of getting the job done - but because performance requirements dictate it.

Cheers - L~R

Replies are listed 'Best First'.
Re: Re: Re: Re: default values
by wolis (Scribe) on Sep 18, 2003 at 03:30 UTC
    Good point however I was more asking the question of:
    "Does it make any difference speed wise or logic wise to ask if a match is true or a match is false in an if statement?"

    I dont think I have ever had an issue with the speed at which Perl does things. Blindingly fast is good enough for me :-)

    I like giving my variables nice descriptive names and making my if elses open and legible - especially if I expect someone else to pick up the code and do something sensible with it :-)

    I guess I'm remembering the old BASIC days when CPUs were slow and it mattered how things were done.

    ___ /\__\ "What is the world coming to?" \/__/ www.wolispace.com