in reply to Re: how to quickly tell if number is in an array
in thread how to quickly tell if number is in an array
For frequent use, make a hash
Yes. (But don't do this with refs.) There are compromises too, like binary searches and Tie::IxHash and other modules. Lots of different trade-offs can be made between ordering restrictions, code complexity, execution time, and space requirements. The trick is picking the right one. :-)
-sauoq "My two cents aren't worth a dime.";
|
|---|