From: Hendrik Tews <tews@tcs.inf.tu-dresden.de>
To: caml-list@inria.fr
Subject: Re: Efficency in OCaml
Date: Fri, 10 Sep 1999 17:19:39 +0200 [thread overview]
Message-ID: <199909101519.RAA18663@ithif20.inf.tu-dresden.de> (raw)
In-Reply-To: <19990902010939.12962@pauillac.inria.fr>
Jerome Vouillon writes:
From: Jerome Vouillon <Jerome.Vouillon@inria.fr>
Date: Thu, 2 Sep 1999 01:09:39 +0200
Subject: Re: Efficency in OCaml
[...]
Each object holds a table containing its methods (the table is shared
among all objets of a same class). A unique integer is assigned at
run-time to each method name of a program. This integer is used as an
index in this table to find the method. As the table is rather sparse,
it is implemented as a two-level array (an array of arrays of
functions). So, a method call
"object#m e1 ... en"
is compile in something that looks like
"object.(0).(idx mod N).(idx / N) objet e1 ... en"
where idx is the integer associated to the method name "m".
Sorry, I don't understand this. How can the compiler know idx, if
it is not known until run-time?
Bye,
Hendrik
next prev parent reply other threads:[~1999-09-10 17:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7qj9lv$aa9$1@goldenapple.srv.cs.cmu.edu>
1999-09-01 18:40 ` chet
1999-09-01 23:09 ` Jerome Vouillon
1999-09-04 14:26 ` Nicolas Ollinger
1999-09-10 13:14 ` Jerome Vouillon
1999-09-10 15:19 ` Hendrik Tews [this message]
1999-09-10 19:03 ` chet
1999-09-15 12:39 ` Jerome Vouillon
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=199909101519.RAA18663@ithif20.inf.tu-dresden.de \
--to=tews@tcs.inf.tu-dresden.de \
--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