In the last episode (Jan 29), Alexander Demenshin said:
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)?
ADT.Queue is using arrays to implemet queues anyway, where is the advantage?
ADT.Queue doesn't adjust the internal array on pop, and only adjusts on push if something has been popped (and even then only after 100 pushes). If your queue is fixed size, you should implement it as an array with head and tail pointers that wrap when they go off the end.