[m-rev.] for review: minor parser optimisation
Peter Wang
novalazy at gmail.com
Tue May 27 15:49:08 AEST 2008
On 2008-05-27, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>>
>> -:- pred parser_get_token_context(token::out, token_context::out,
>> - state(Ops, T)::in, state(Ops, T)::out) is semidet.
>> +:- pred parser_get_token_context(token, token_context,
>> + state(Ops, T), state(Ops, T)).
>> +:- mode parser_get_token_context(in, out, in, out) is semidet.
>> +:- mode parser_get_token_context(out, out, in, out) is semidet.
>>
>> parser_get_token_context(Token, Context, ParserState0, ParserState) :-
>> Tokens0 = parser_state_get_tokens_left(ParserState0),
>
> I suggest that you add a comment stating that the implied mode of these
> predicates is intentional (and why, i.e. what the log message says).
Done.
>> PS. The problem I'm trying to solve is the reading of .analysis files. When
>> making an .analysis file, reading in other analysis files can take nearly half
>> of the running time, mainly due to large structure sharing/reuse results.
>> Suggestions would be appreciated.
Turns out some of the results are 0.5 MB big..
Peter
--------------------------------------------------------------------------
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