Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: [Caml-list] strange behaviour with variants and "cannot be g eneralized"
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Frederic De Jaeger <Frederic.De.Jaeger@e...>
Subject: Re: [Caml-list] strange behaviour with variants and "cannot be g eneralized"

skaller> They not only allow more accurate typing,
skaller> they're also *faster*. For example,
skaller> consider a restriction of a term type
skaller> in which rewriting rules reduce some 
skaller> sugars to lower level primitive
skaller> (for example macro expansion).

[example skipped]

That's right, in this case they are faster.  But the pattern matching
against polymorphic variants is slightly slower than the
non-polymorphic ones.  The later can be compiled as a parametric
jump. 

Cheers,

  Frédéric De Jaeger

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners