[m-rev.] for review: speed up the declarative debugger by 127%
Zoltan Somogyi
zs at cs.mu.OZ.AU
Sun Aug 14 12:26:27 AEST 2005
On 13-Aug-2005, Ian MacLarty <maclarty at cs.mu.OZ.AU> wrote:
> I got a further speed improvement (about 3%) by converting all the functions
> called from MR_trace_decl_debug to macros, but decided to reverse that change
> since the performance gain didn't seem worth the headache of maintaining a lot
> of macros, especially since the change below gives such a huge improvement.
Is this 3% before or after the 56%? What is 3% before the 56% becomes 6% after,
which is worthwhile.
> + /*
> + ** MR_trace_decl_debug will decrement MR_edt_depth again, so we
> + ** increment it here, so that the overall effect is that it is only
> + ** decremented once.
> + */
> + MR_edt_depth++;
It would be nice if we could avoid games with decrement/increment/decrement
again. At least, you should document (a) where the initial decrement is, since
it is not visible here, and (b) why you want an overall decrement in the
first place.
> + {
> + MR_TRACE_EVENT_DECL_AND_SETUP
> + jumpaddr = MR_trace_decl_debug(&event_info);
> + MR_TRACE_EVENT_TEARDOWN
> + }
> + } else {
> + if (depth_in_imp_subtree < MR_edt_implicit_subtree_num_counters) {
> + MR_edt_implicit_subtree_counters[depth_in_imp_subtree]++;
> + }
> + }
> + return NULL;
Please add a comment such as
/* MR_TRACE_EVENT_TEARDOWN ends by returning jumpaddr to the caller */
before the invocation of MR_TRACE_EVENT_TEARDOWN.
The diff is otherwise fine.
Zoltan.
--------------------------------------------------------------------------
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