[m-rev.] for review: read .opt files transitively

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Apr 19 12:59:13 AEST 2001


On 18-Apr-2001, Peter Ross <peter.ross at miscrit.be> wrote:
>
> A patch like this is also needed for the reuse analysis, because the
> type (and hence representation) of every variable needs to be known.  I
> have one implemented on the reuse branch.

Ah, right, I see it now.  I had noticed your change on the reuse branch
to make trans_opt.m read .trans_opt files transitively, but not the one
to intermod.m.

> However I am not totally sure of the correctness of my approach.

Nor am I ;-)
I'll have a look at your change and mine and see if I can extract the
best of both.

> However the increased amount of inlining due to the transitive reading
> in of the .opt files lead to a 5% speedup on the ICFP programming
> contest entry, so I think it is worthwhile to make it the default
> behaviour for intermodule optimization.

Now that I think about it, I remember running into this issue with
Ralph's "compress" implementation.  In that case the speedup was
quite significant, because the routine in question that wasn't being
inlined was the one to read a single character.  I just measured it --
the speedup is 25%.  (Previously I had worked around this problem
by just adding extra `import_module' declarations to the source code,
but obviously that's not the ideal way to solve the problem.)

So I agree we should do this by default.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list