"Marcin 'Qrczak' Kowalczyk" <qrczak / knm.org.pl> wrote in message news:slrnaph9gg.sd0.qrczak / qrnik.zagroda... > Sun, 29 Sep 2002 02:28:30 +0900, William Djaja Tjokroaminata <billtj / y.glue.umd.edu> pisze: > > > However, this is just my guess, when we use a garbage collector, > > there immediately we incur significant performance drop as compared > > to C. > > Not that significant. OCaml is fast and garbage-collected. I've > heard some Lisp and Scheme implementations are also fast despite > dynamic types. There is a technical paper at the OCaml site discussing strict typing versus dynamic typing as an experiment, but it turns out that the occosional typecheck was not a bottleneck and that too strict typing could prevent smarter solutions (or at least that is how I remembered the conclusion). Note that although OCaml is statically typed, it uses a lot of semi-dynamic data thanks to variant records where a 1 byte hash key (possibly optimized to a jumptable) is used to decide which among a known number of alternatives are stored. For example a tree node can be an internal node or a leaf node. This happens everywhere OCaml uses a pattern match, and I don't think this is heavily optimized because the code expansion would easily explode in recursions. Mikkel