in reply to Hair Splitting?
So how long does you script take to run and how many times does you script execute such code per run? For example, if your script takes 0.01 seconds to run, and you execute this code 100 times per run, then, based on my benchmarks, the 15% speed-up in this code will make your script run about 0.000063 seconds faster, or less that 0.6% faster.
I suspect that your script takes longer than that to run and that it doesn't execute that code that many times so your "savings" are even more miniscule.
But to answer you question, "I don't care." (:
When benchmarking, I mostly discount difference under 20% as a 5% or 10% difference can often be due to which test gets run first, or other unimportant details and so 20% is a pretty minor difference.
But most benchmarks I see (even most of the ones I've done) are timing microscopic operations and so even a 10-fold speed increase is likely to be nearly completely dwarfed by the rest of the work being done. Now, when you benchmark a microscopic operation that your script doesn't even do a few thousand or million times, then you are really going to a lot of work to fairly accurately measure how insignificant the change is, and then focusing on the wrong number.
And when you do these benchmarks before you have even identified that you have a performance problem and that the operation is in fact part of a bottleneck, then you are pre-optimizing. And premature nano-optimization is very common (at least in Perl circles) and can be kind of fun, but you should mostly ignore it beyond the "fun" aspect.
So I might find it fun if someone figures out the cause of this speed difference. But I don't really care. :)
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: Hair Splitting?
by harleypig (Monk) on Dec 13, 2001 at 12:04 UTC |