in reply to Re^4: Re-orderable keyed access structure?
in thread Re-orderable keyed access structure?
You will only get away marginally cheaper at best. It's just the way things work in this universe. You need bidirectional lookup on keys and indices, so that's what you'll have to maintain one way or another.
If the double slice my suggestion requires irks you, you can use a $idx => $key hash instead of an array for %key_for. If you have a million short digit-only keys, hash collisions might ruin your day anyway though.
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Re-orderable keyed access structure?
by BrowserUk (Patriarch) on Aug 14, 2004 at 20:23 UTC | |
by Aristotle (Chancellor) on Aug 14, 2004 at 20:30 UTC | |
by BrowserUk (Patriarch) on Aug 14, 2004 at 20:53 UTC |