[MLton] floating points in Mlton

Lukasz S Ziarek lziarek@cs.purdue.edu
Thu, 25 Mar 2004 09:26:16 -0500 (EST)


I have a question about mlton and its handling of floating points. Should
there be a performance difference between a call that pushes a tuple of
floating point numbers onto the stack and a call that pushes each float
individually onto the stack. The first scheme will simply pass an address
to where the tuple is located on the heap, the later will pass multiple
addresses where each float is located on the heap (they are boxed
correct?). Thus, it seems like we have the exact same number of memory
indirections we need to follow to get to the floats. Does mlton do
something different than I described, or is there something I am missing/
not understanding.

As a sanity check, I compared my flattener to mlton without flatten and
local flatten (IE no flattening, since we should always be better than
this basic case). What I found is that there are only 3 benchmarks that we
do worse, and in each case we increase the number of arguments passed
around by a significant factor. For example, in nucliec we do so by a
factor of 10.


Luke