caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Yann Salmon <yann.salmon@prepas.science>
To: caml-list@inria.fr
Subject: [Caml-list] Time complexity of Queue.length
Date: Tue, 25 Feb 2020 20:05:00 +0100	[thread overview]
Message-ID: <9ab4107b-0dfe-26b6-6502-871b8fd26ce1@prepas.science> (raw)

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/>

                 reply	other threads:[~2020-02-25 19:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ab4107b-0dfe-26b6-6502-871b8fd26ce1@prepas.science \
    --to=yann.salmon@prepas.science \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).