caml-list - the Caml user's mailing list
 help / Atom feed
* [Caml-list] Time complexity of Queue.length
@ 2020-02-25 19:05 Yann Salmon
  0 siblings, 0 replies; 1+ messages in thread
From: Yann Salmon @ 2020-02-25 19:05 UTC (permalink / raw)
  To: caml-list


the OCaml standard library documents Stack.length to be O(1).

This is not guaranteed by the documentation of Queue.length, although
the current implementation is just reading the relevant field in the
structure and is therefore O(1).

I wonder what is the reason for this apparent discrepancy. Is it to
allow for a radical change of Queue implementation in the future ?

Yann Salmon

Professeur agrégé
Informatique en CPGE
Lycée Descartes - Tours


^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25 19:05 [Caml-list] Time complexity of Queue.length Yann Salmon

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror

AGPL code for this site: git clone public-inbox