[m-rev.] For review: Modify deep profiling tools to use new datastructures.

Zoltan Somogyi zs at csse.unimelb.edu.au
Mon Jul 28 14:07:13 AEST 2008


On 25-Jul-2008, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> How do you feel about 'measurement_units'?

That seems OK.

> I'm preparing a seperate patch to introduce sv_append/3 to
> library/string.m.  Then here I an use sv_append("<br>\n", !HTML)

I don't think that is very intuitive.

Simply using 

	!:HTML = !.HTML ++ "..."

would do here.

> It hasn't been a problem yet.  This module suffers from the general
> problem that S = S0 ++ S1 ++ .. ++ Sn, runs in time O(N*length(S0) +
> (N-1)*length(S1) ...) which is O(N^2).
> 
> I'd like to leave the code above alone until we're ready to fix the
> general problem (which is not very high compared to other things we'd
> like to improve).

The right fix is probably to change the representation of the HTML from
a simple string to a cord of strings, which is then converted to a single
string just before being printed out. I can do that after you check in this
diff. Most of the code won't have to be changed, since ++ is also the operator
for concatenating cords.

> Now reads:
> 
>     The representation of a procedure in the report structure, including
>     information about it's location in mercury source code.

s/it's/its/

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