[mercury-users] Field assignment optimisation
Julien Fischer
juliensf at cs.mu.OZ.AU
Tue May 10 14:54:12 AEST 2005
On Mon, 9 May 2005, Michael Day wrote:
> > Can you send us your test program? What optimization level are you
> > using? These intermediate structures certainly *should* be optimized
> > away.
>
> I'm only guessing at what is going on, but based on timing and mprof
> output replacing the multiple field assignments with a single construction
> gives quite a significant speedup.
>
> The structure in question has 87 fields and there were 12 field
> assignments.
>
> The compilation grade is asm_fast.gc (and asm_fast.gc.prof) and the
> compilation options include -O5 --intermodule-optimisation
> --trans-intermod-opt.
>
> Providing the entire program is not possible in this case however, as it
> is rather large.
>
No matter, we've just provided our own test program ;-). You're correct,
the compiler is doing a really dreadful job of optimizing multiple
field assignments (essentially by not optimizing them at all.)
Cheers,
Julien.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list