Re: queue-length should be O(1) ? Takashi Kato 03 Dec 2014 18:13 UTC

> You trade off adding a mutation for every element added and removed to the
> queue for speeding up queue-length.  I suspect that's not a good trade.
> I suspect queue-empty? is far more likely to be used, and that's fast.
Isn't it, then, better not to specify the order so that implementation
may choose how it's implemented at least for this particular procedure?
Or do the orders indicate worst cases?

_/_/
Takashi Kato
E-mail: xxxxxx@ymail.com