An array access by index will be faster than a hash table lookup, but not by all that much unless you do this a bazillion times.
Accessing an array is measurably, and for some things substantially, faster than accessing a hash; but the big problems with using an array for the OPs usage are:
Perl's hashes take care of this; and do so very efficiently.
In reply to Re^5: Generating Unique numbers from Unique strings
by BrowserUk
in thread Generating Unique numbers from Unique strings
by rjohn1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |