[MLton] Re: [MLton-user] FFI and pointer relocation

Vesa Karvonen vesa.a.j.k at gmail.com
Wed Nov 28 06:09:29 PST 2007


On Nov 28, 2007 1:25 PM, Wesley W. Terpstra <wesley at terpstra.ca> wrote:
> On Nov 27, 2007, at 5:15 AM, Matthew Fluet wrote:
[...]
> However, due to the IntInf arithmetic, it's actually 4* slower than
> Int64 gettimeofday() on powerpc/osx and 1.5* on x86/linux. It also
> wastes about 140 bytes of heap. It's interesting the osx system calls
> are so much faster.

Did you try this with the C backend on x86/linux?  That might explain
the difference.

While, like Matthew, I don't feel that Time computations are
performance critical, I see no harm in using 64-bit integers for time.
 However, I think that it is worth preserving the option to use IntInf
time values.  Looking at the current Time implementation, it would
seem fairly easy to turn it into a functor and parameterize it with an
INTEGER module.  A compiler switch (perhaps extending -default-type)
could then be added to allow one to choose the year at which the
application raises Time.

-Vesa Karvonen



More information about the MLton mailing list