From: "Chris King" <colanderman@gmail.com>
To: "O'Caml Mailing List" <caml-list@inria.fr>
Subject: Performance of immediate objects
Date: Tue, 11 Jul 2006 10:10:38 -0400 [thread overview]
Message-ID: <875c7e070607110710k2ca8d548i7f9d8e22d801df8e@mail.gmail.com> (raw)
Is there a substantial difference to the way in which
class foo (i:int) = object
val v = i
method bar = v
end
let mk_foo i = new foo i
and
let mk_foo (i:int) = object
val v = i
method bar = v
end
are compiled? I've run a couple tests with the above and immediate
objects seem to be about 15% slower than classes. Is this because a
new method table is created for the immediate object every time or is
that the case for classes also?
- Chris King
next reply other threads:[~2006-07-11 14:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-11 14:10 Chris King [this message]
2006-07-12 0:51 ` [Caml-list] " Jacques Garrigue
2006-07-12 4:08 ` Chris King
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=875c7e070607110710k2ca8d548i7f9d8e22d801df8e@mail.gmail.com \
--to=colanderman@gmail.com \
--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