[m-rev.] fore post-commit review: improve the speed of the typechecker
Zoltan Somogyi
zs at csse.unimelb.edu.au
Mon Aug 2 10:31:29 AEST 2010
On 31-Jul-2010, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> I ment to ask when we spoke on Friday. Why is this a speedup? IIRC the other
> day you said it slowed down performance slightly (probably within the margin
> of error).
I improved the code since then. The original version split the predicate list
into valid and invalid preds, processed the valid preds, and appended the new
list of valid preds to the invalid ones. The new version traverses a list of
all the predicates, and simply returns the invalid ones unchanged. And since
the resulting list is sorted, I could use map.from_sorted_assoc_list on it,
which is faster than map.from_assoc_list, since it does not do repeated
insertions.
Zoltan.
--------------------------------------------------------------------------
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