in reply to Re^2: A better way of lookup?
in thread A better way of lookup?
Actually, both outer 'if / else' conditional statements could be reduced to just 'return ...' since each previous test did a 'return...' if the test was 'true'.
Not as much of an improvement as the 'elsif', but since BrowserUk may have more information about the frequency of the inputs, I left it in with the hope that it would help. Another consideration is that BrowserUk uses 64bit Windows and I use mostly 32bit *nix. That's why the benchmarking is critical, since the results may be different in his environment. Please note, that I had to add brackets around the 'return' in order to compile his original script in my environment. YMMV!
Regards...Ed
"Well done is better than well said." - Benjamin Franklin
|
|---|