[mercury-users] XML Parsing

Ralph Becket rbeck at microsoft.com
Tue Jun 5 22:54:33 AEST 2001


> From: Thomas Conway [mailto:conway at cs.mu.OZ.AU]
> Sent: 05 June 2001 00:45
> 
> It makes compilation slow, but for parsing, it's actually quite quick.
> The closure is nested but looks something like:
> 
>     (range(...) or (range(...) or ....))
> 
> Now, all the ascii codes are entailed by the first range(...) call,
> so actually, for ascii documents, the overhead is not terrible at
> all in that particular spot. I actually think it's probably the
> overhead of the combinators and the number of levels of higher order
> call. Remember, higher order calls are MUCH more expensive that 1st
> order calls.

Oh well, it was a nice theory.

I'm not clear why HO calls should be so much more expensive, given that
Mercury doesn't have full currying.  I would have thought that setting 
up arguments would be much the same, but performing the call jump would 
require a level of indirection to find the call target.  What *is* the
HO call process, out of interest?

As for the XML parser, maybe we'll just have to bite the bullet and
recode it for moose if we want speed (assuming the overhead for
parser combinators is insurmountable).

- Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list