[m-dev.] Re: [G12-local] slow zinc evaluation tests

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Apr 8 14:21:06 AEST 2008


On Tue, 8 Apr 2008, Julien Fischer wrote:

>
> On Tue, 8 Apr 2008, Nicholas Nethercote wrote:
>
>> On Mon, 7 Apr 2008, Julien Fischer wrote:
>
>>> with n=2 takes 42s (with 11,607 lines of C code generated by mmc)
>>> with n=5 takes 6s  (with 4020 lines of C code generated by mmc)
>> 
>> I think I know how to compile the Zinc so that each item becomes a separate 
>> Mercury predicate, instead of compiling all non-pred/func items into a 
>> single predicate -- Zinc parameters/variables will have to be stored in a 
>> table and looked-up when used instead of just being represented as Mercury 
>> variables.
>> 
>> This is a bit of a pain, but it seems like big predicates are bad for mmc 
>> and/or gcc, and they're only going to get bigger as the models increase in 
>> size.  Also, I was going to have to do something table-like for accessing 
>> Zinc global variables in the generated code for Zinc preds/funcs anyway.
>
> Another possible explanation for the timing discrepencies occurred to
> me last night, eris's mmc is built in hlc.gc, Nick's is presmuably
> built in asm_fast.gc - it looks like the MLDS backend is not doing
> a very good job somewhere along the line.

Indeed, that seems to be the case.  The hlc.gc version of the (Mercury) compiler
seems to have a fairly nasty performance problem somewhere.  The timings
below are for compiling Mercury->C in both grades hlc.gc.tr and
asm_fast.gc.tr.  Compiler A is built in grade hlc.gc, while compiler B
is built in grade asm_fast.gc.  (The module being compiled is
builtins.m, generated from tests/evaluation/zinc/builtins.zinc using
the Zinc compiler - the machine was pluto.)

 	Compiler A:
 	grade: hlc.gc.tr  	- 1m59s
 	grade: asm_fast.gc.tr	- 3.3s

 	Compiler B:
 	grade: hlc.gc.tr	- 3.1s
 	grade: asm_fast.gc.tr	- 2.8s

Julien.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list