Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Sweating the small stuff: a lesson in optimisation

by RMGir (Prior)
on Mar 16, 2009 at 13:08 UTC ( #750890=note: print w/replies, xml ) Need Help??

in reply to Sweating the small stuff: a lesson in optimisation

Very entertaining read. I hope everyone reads all the way to the end - the last benchmark cracked me up.

The only question you didn't mention was "how fast is fast enough for this application?"

  • Comment on Re: Sweating the small stuff: a lesson in optimisation

Replies are listed 'Best First'.
Re^2: Sweating the small stuff: a lesson in optimisation
by Porculus (Hermit) on Mar 16, 2009 at 21:40 UTC

    That was part of the lesson, really. In practice any of the implementations would be "fast enough". The speed of this function does make a measurable difference to the run-time, but measurable isn't the same as significant; the entire program currently spends maybe two minutes a day running, so even if that was all spent in these routines, it still wouldn't make much difference.

    (I didn't profile before I started; I went straight to optimisation mode because this particular routine involved Other People's Code and it Looked Inefficient. Hubris again.)

    I wrote the final version purely out of curiosity, and it put things so firmly in perspective that I just had to write it up.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://750890]
[Corion]: ambrus: Most of our "automation" is tied to process exit codes and a shell pipeline :-\
[LanX]: ... a week later they realized that one of the databases - which recorded how much the other banks due to this bank - was not correctly plugged
[ambrus]: Corion: I have no problem with exit codes and shell pipeline. My problem is that the current process requires a lot of manual intervention from me, including editing the source codes.
[ambrus]: (Also a lot of manual intervention by two or three other co-workers, who do other parts of the process.)
[ambrus]: Some of the manual part is unavoidable, but not all.
[choroba]: LanX was there a way to recover the numbers from the remaining information?
[Corion]: LanX: Ow ;)
Discipulus manual work: i just tell the same to my boss: every time the quick solution is to assign some manual data entry task to my group.. because we have not direct access to many databases here..

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2017-03-29 11:58 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (350 votes). Check out past polls.