in reply to Re: speed of comparisons of things
in thread speed of comparisons of things
No, you can't have references of two different types that have the same address, so there would be no point for the code to compare the type of references.
I ran your code and the "strings" case was always the fastest. The other cases except for "take a reference" were within 20% of this speed. Some runs had "quick_refs" faster than "numbers", some vice versa.
Each of these facts reinforce my opinion that this is yet another example a premature nano-optimization. q-:
Even the "take a reference" case was only two-times as slow. Having some comparisons be two-times as slow is likely to make my real-life script, um.... 0.1% slower. I don't care. I've already wasted more time than that would ever save me adjusting my .sig. (:
Update:
I wind up with numbers fastest, hands downI don't see how you can call 15% in a benchmark "hands down". In a benchmark, I call 20% "indeterminate". And, yes, I know you didn't start this thread. :) - tye (yeah, this part)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: speed of comparisons of things
by RMGir (Prior) on Sep 25, 2002 at 21:07 UTC | |
by tye (Sage) on Sep 26, 2002 at 06:23 UTC |