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

Greetings,

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 ?

-- 
Cordialement,
Yann Salmon

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

<https://pro.yannsalmon.fr/>

^ 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 https://inbox.ocaml.org/caml-list

AGPL code for this site: git clone https://public-inbox.org/ public-inbox