On Wed, Jan 29, 2003 at 02:10:03AM +0100, Martin Nilsson (Åskblod) @ Pike (-) developers forum wrote:
a = a[1..]; a += ({ some_value }); This is quite slow, especially for big arrays :)
And mappings would help here, or what is your point? That inappropriate use of a datatype is slower than using the right one (ADT.Queue)?
well, but exactly this information that one should use ADT.Queue for things like these instead of arrays would be another optimization hint.
consider that while array is an abvious and easy to understand datatype to new users, ADT.Queue is much more obscure and will only be found by people who read the docs front to back.
the discussions shows that there is lots of material for optimization in pike, with the difference that the optimizations are not about workarounds to obscure limitations (as in python)
more of that...
greetings, martin.