[m-rev.] for post-commit review: using set_of_var for nonlocals

Julien Fischer juliensf at csse.unimelb.edu.au
Fri Aug 19 01:49:26 AEST 2011


On Tue, 16 Aug 2011, Zoltan Somogyi wrote:

> The diff is big but very boring. I would appreciate reviews, even partial
> ones: since almost all the changes are extremely local, you do NOT need
> any kind overview beyond the log message to be able to check the correctness
> of each block in the diff.
>
> I am committing this now because the size of the diff means that it has
> a high chance of conflicting with other changes. I did test it in several
> grades.
>
> Zoltan.
>
> Switch from using set(prog_var), which is represented using set_ordlist,
> to set_of_progvar, which is represented using tree_bitset, for most sets
> of variables in the compiler, including the nonlocals sets in goal_infos.
>
> This diff yields about a 5% speedup when compiling the training_cars_full.m
> stress test, but also about a 1% slowdown on tools/speedtest. Both of these
> are with the current default state in which tree_bitset is compiled with
> a whole bunch of sanity checks. If these are disabled, we get roughly a 1%
> speedup on tools/speedtest. I intend to disable those sanity checks after
> a shakedown period of a week or two in which the updated version of the
> compiler is installed on our platforms.
>
> compiler/hlds_goal.m:
> 	Replace almost all occurrences of set(prog_var) with set_of_progvar.
> 	The main exceptions are the types supporting rbmm.

Is there a technical reason for that  or is it just question of
available time?

> compiler/set_of_var.m:
> 	Add some more predicates and functions that previous existed on sets
> 	but not yet on set_of_vars.
>
> compiler/*.m:
> 	Conform to the change in hlds_goal.m, and make similar changes
> 	in set representations.
>
> library/bag.m:
> 	Add a predicate and function for creating a bag from a sorted list.
> 	We already had them for creating a bag from a set, but a set_of_progvar
> 	shouldn't have to be converted to a set.
>
> library/robdd.m:
> 	Fix deviations from our programming style.

The diff looks fine.

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



More information about the reviews mailing list