Browse thread
questions about costs of nativeint vs int
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Sven LUTHER <luther@d...> |
| Subject: | Re: Cost of polymorphic variants over normal ones. |
On Thu, Jan 11, 2001 at 11:40:05AM +0100, Alain Frisch wrote: > On Thu, 11 Jan 2001, Sven LUTHER wrote: > > > A (somewhat) related question would be, what is the cost of polymorphic > > variants compared to noarmal ones ? > > > > The normal variants are coded as integers, and using them is fast, while > > polymorphic variants use some kind of hash functionn, but very simple. > > AFAIK, the hashing is done only during the compilation (or explicitly > by external C functions). For instance (output of ocaml -dinstr): Thanks for this info, i almost guessed that such was the cas,e but was not sure, Friendly, Sven Luther