self compile times

Stephen Weeks MLton@sourcelight.com
Tue, 14 Nov 2000 12:01:00 -0800 (PST)


Yeah!  I finally have a stable version of the compiler with both the C and
native backends working.  I just did four different self compiles, with the
C compiled and natively compiled MLton producing a C compiled and natively
compiled MLton.  The numbers are quite pleasing.  First of all, here are the
code sizes for a C and native MLton.

Code size
             text     data      total
C       3,440,089  796,224  4,236,313
native  3,529,753  600,592  4,160,361

Now for the running times.  The table has the running time in seconds for each
of the four possibilities.  The number in parens for is the time spent running
in MLton (as oppossed to gcc or as).

			      compilee
			C		native
compiler	C	1411 (396)	1026 (982)
	   native	1373 (354)       884 (839)

So, we're getting a huge win due to the assembly + linking time only taking 45
seconds with the native backend.  The native MLton is also running 15% faster
than the C MLton (compare 982 and 839) when producing native code.

Here's one other interesting set of numbers.  For the C and native MLton
producing a native MLton, the amount of time spent in the x86 codegen is 595 and
493 seconds, respectively.  So, well over half the time is spent in the code
generator.

I'm still looking forward to breaking the 10 minute benchmark for a self
compile.