change to library/queue.m

Fergus Henderson fjh at cs.mu.oz.au
Tue Oct 14 17:54:52 AEST 1997


Andrew Bromage, you wrote:
> Estimated hours taken: 0.2
> 
> library/queue.m:
> 	Fix an inefficiency where in some circumstances, queue__head
> 	could take O(n) time where n is the number of elements in the
> 	queue.  The fix is to impose (and maintain!) an extra
> 	constraint on the queue data structure which guarantess that
> 	the bad case never turns up.

That looks OK to me.

Maybe it would be worth implementing queue__put_list more efficiently.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list