in reply to Re: A better way of lookup?
in thread A better way of lookup?
There's another possible micro optimization. You could change the last line of the second group to just return 7200000 as you already know v is less then 64800000. There's no point testing it again.
# replace elsif( $v < 64800000 ) { return 7200000; } #with else { return 7200000; }
BTW that's an interesting result that elsif is quicker, did you test them in isolation? What improvement did the partial binary chop make compared with the elsif?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: A better way of lookup?
by flexvault (Monsignor) on Apr 26, 2015 at 17:36 UTC |