[MLton-devel] datatype variant tag optimization

Stephen Weeks MLton@mlton.org
Fri, 15 Nov 2002 16:19:08 -0800


A post from Xavier Leroy on comp.lang.ml yesterday pointed out an
optimization that is done in OCaml that we could do in MLton -- for
datatypes with multiple value-carrying variants we could keep the
variant tag in the header instead of using a word in the object.  This
fits in nicely with the header word type index scheme that I installed
over the summer, and would save a word per object.

MLton has lots of syntax trees, so this could be a pretty common
case.  There is a time performance hit due to an extra fetch to get
the tag.


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel