http://www.perlmonks.org?node_id=125865


in reply to Re: Efficiency and overhead of subs
in thread Efficiency and overhead of subs

I'm not sure I would agree with this (throwing a bone in here to start another discussion). While I agree that one of the purposes of developing a program is to create it as lazily/quickly, readable/maintable as possible, a bigger purpose is to serve the end user of the program. While we're talking about microseconds, they can add up under exponential usage (such as IMDB using mod_perl instead of CGI scripts) and if the user can appreciate faster response times, I'm for taking more development time and serving that purpose.

My argument only holds up in those special cases, though, where the usage is enormous - so I'd answer the original pos(t)er of the question with "It Depends" (the quintessential answer of Consultants everywhere ;)) and it depends on the usage of the program.

And if you're talking about a totally different dev environment (C, Assembly, etc), where I'm not proficient in and would take significant research/dev to get proficient, Perl's good 'nuf for me (so that would be another exception to my argument ;)).

Jason

  • Comment on Re: Re: Efficiency and overhead of subs

Replies are listed 'Best First'.
Re: Re: Re: Efficiency and overhead of subs
by cacharbe (Curate) on Nov 17, 2001 at 01:51 UTC
    I totally agree that it depends..Let me tell you why.

    I just finished a project that took a process that someone was doing by hand (going to a web site through a series of pages, copy, paste into excel...blah, blah) which took roughly 3-5 hours a day, and streamlined it down to a couple hundred lines of code that is a click-and-walk-away process of about 20-30 minutes. That's a savings on the order of 1x103% improvement in time.

    Now I could probably shave another 5-10% off of the remainder if I wanted to implement fork() in this windows2k world here in my office, but frankly, considering what they already have, I doubt the end-user is going to notice those last 2 minutes, and the headache wasn't worth it.

    When it comes to implementation, YMMV. Work where you're comfortable, and determine your trade-offs. re - Time and Effort vs. Return.

    Just my US$0.02 worth.

    C-.