Browse thread
Efficency of varient types
-
Michael D. Adams
- Stefan Monnier
- Nicolas Cannasse
- Jon Harrop
- Lukasz Stafiniak
- David Baelde
[
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: | 2005-11-27 (14:57) |
From: | Lukasz Stafiniak <lukstafi@g...> |
Subject: | Re: [Caml-list] Efficency of varient types |
2005/11/26, Michael D. Adams <mdmkolbe@gmail.com>: > I have recently learned about OCaml and have been impressed by how > fast it is in the benchmarks. However I have discovered that variant > types can slow down a program quite a bit. [...] > I am working on a program that translates code from scheme into ocaml. > (Later I will try python into ocaml.) Because it is a dynamicly > typed language, the most natural translation would make everything a > function of a large variant type like: > > type value = Int of int > | Char of char > | String of string > (* etc. *) > Use MetaOCaml with native-code compilation and untagging. MetaOCaml retypechecks and outputs the untagged version if it can. Best Regards, Lukasz