[MLton-user] A few questions

David Hansel hansel at reactive-systems.com
Wed Dec 12 07:00:27 PST 2007


Hi again,

Matthew Fluet wrote:
> On Fri, 7 Dec 2007, David Hansel wrote:
>> - One reason why we are considering moving to MLton is to support
>>  the AMD64 platform on Windows.  As far as I understand, MLton
>>  already can produce 64bit compatible code but the problem is to
>>  find a compiler/build system on Windows that produces 64 bit
>>  executables.  I found this thread
>>  http://mlton.org/pipermail/mlton/2007-July/029907.html
>>  which talks about some issues but does not come to a workable
>>  conclusion.  Has anyone made progress or gained some more
>>  insights into this?
> 
> As far as I know, there hasn't been any progress along this front.
> Though, Wesley just posted to the mlton at mlton.org mailing list the
> (positive) results of some efforts in this direction.  So, it doesn't
> seem impossible.
> 
> The main difficulty is resources: time, but also machines.

I downloaded the environment that Wesley had put together.  It _almost_
works, but for any non-trivial part of our sources I get a link error
about the missing symbol "__imp___difftime64".  I guess it's the same
problem as what Wesley mentioned in his post about the "date" regression
failing.  Any suggestions on how to work around that?

Anyways,  this is a very encouraging first step and I would like to
help in getting MLton to work on Win64.  I can mostly offer testing
(i.e. compiling and running our sources) but given time I might be able
to find/fix one or the other problem myself.

>> - We have observed that the executable size for our application
>>  when compiled with MLton is about 3x the size of the heap generated
>>  by SML/NJ for the same application (60MB vs. 20MB).  Does anybody
>>  have an idea what could be the reason for this?  Any suggestions as
>>  to how we can track down where the large size comes from?
> 
> That is rather large.  The MLton produced executable will include the
> MLton runtime system, whereas the SML/NJ heap would not include the
> SML/NJ runtime system.  But, runtime system is only about 30K.
> BTW, is the MLton produced executable stripped?  The native codegen is
> pretty free with assembly labels, so they can add up in an unstripped
> executable.

Thanks, the "strip"ing was the problem.  Sorry,  newbie mistake.  After
stripping,  the executable size goes down from 60MB to 28MB,  which is
great.   By the way,  is it possible to instruct MLton not to put the
labels there in the first place (as opposed to stripping them afterwards)?

Thanks,

David


-- 
  ----------------------------------------------------------
  David Hansel
  Senior Software Engineer -- Reactive Systems, Inc.
  http://www.reactive-systems.com/
  (703) 738-9275 -- hansel at reactive-systems.com
  OpenPGP (GnuPG) public key file:
  http://www.reactive-systems.com/~hansel/pgp_public_key.txt
  ----------------------------------------------------------



More information about the MLton-user mailing list