caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Just how slow are classes?
@ 2015-12-18  8:19 Jordan W
  2015-12-18 11:06 ` Gerd Stolpmann
  0 siblings, 1 reply; 4+ messages in thread
From: Jordan W @ 2015-12-18  8:19 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 784 bytes --]

I am aware of some of the reasons why OCaml classes and objects are slower
than records. The lack of nominal subtyping makes determining memory layout
at compile time much more difficult.

While I am also curious why "nice cases" of objects/classes couldn't be
optimized (perhaps some link time check), when most of the objects adhere
to a nice hierarchy, I would like to defer that discussion until another
time. For now, my primary question is: Just *how* slow are objects/classes?
Has there been any relevant benchmarking efforts that could shed some light
on this?

For example, how much more expensive in terms of memory are objects
(compared to records). How much slower are property accesses and method
invocations than record accesses and module function invocations?

Jordan

[-- Attachment #2: Type: text/html, Size: 892 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-18 11:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-18  8:19 [Caml-list] Just how slow are classes? Jordan W
2015-12-18 11:06 ` Gerd Stolpmann
2015-12-18 11:13   ` David Rajchenbach-Teller
2015-12-18 11:19   ` Leo White

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).