Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Stefan Monnier" <monnier+lists/caml/news/@RUM.cs.yale.edu>
To: caml-list@inria.fr
Subject: Re: Data structure efficiency questions
Date: 19 Sep 2000 15:07:19 -0500	[thread overview]
Message-ID: <39c7b967@tequila.cs.yale.edu> (raw)
In-Reply-To: <14791.6318.709323.906054@pc803>

>>>>> "Jean-Christophe" == Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr> writes:
> In his message of  September 18, 2000, David=?iso-8859-1?Q?_Mentr=E9?= writes: 
>> 1. Is the @ operator costly or is it implemented as a simple pointers
>> manipulation?

I'm not sure what you mean by "not costly" since the "pointer manipulation"
still requires to go down one of the lists.

> @  cannot be  implemented as  a simple  pointer  manipulation, because
> lists are  persistent data  structures. It means  that l1 and  l2 must
> remain the same lists after the evaluation of l1 @ l2.

You could of course have a list datatype as (pardon the SML syntax):

    datatype 'a list = Nil | Cons of 'a * 'a list | @ of 'a list * 'a list

Although this probably wouldn't be described as "pointer manipulation".


        Stefan



      reply	other threads:[~2000-09-20 19:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-18 15:19 David Mentré
2000-09-19  7:41 ` Jean-Christophe Filliatre
2000-09-19 20:07   ` Stefan Monnier [this message]

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=39c7b967@tequila.cs.yale.edu \
    --to=monnier+lists/caml/news/@rum.cs.yale.edu \
    --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