in reply to Re^9: Re-orderable keyed access structure?
in thread Re-orderable keyed access structure?
Interesting that you pick 100,000. That was about the break-even point in some quick benchmarks. On one system the heap was a litle faster at that point, while on one they were neck-and-neck (or else splice was twice as fast, depending on the test).
Moving one more chunk of memory when moving a bunch of them already is extremely fast (it is usually one assembly language instruction to move the entire region). Dispatching Perl opcodes is surprisingly slow. So the constants involved here are very large.
But you are correct, the heap will eventually win when the dataset gets large enough.
I'll try to include the code I used for testing when I get access to it again...
- tye
|
|---|