[mercury-users] XML Parsing

Thomas Conway conway at cs.mu.OZ.AU
Tue Jun 5 09:44:47 AEST 2001


On Tue, Jun 05, 2001 at 02:46:56AM EST, Ralph Becket wrote:
> I haven't tried profiling the XML parser, but looking at the source it
> seems that the real sticking point is the production for spotting
> letters which is an enormous disjunction of Unicode character ranges.
> 
> (Thomas mentions this in reference to compilation times in
> http://www.cs.mu.oz.au/research/mercury/mailing-lists/mercury-users/merc
> ury-users.0012/0054.html)

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.

Thomas
-- 
  Thomas Conway )O+
 <conway at cs.mu.oz.au>       499 User error! Replace user, and press any key.
--------------------------------------------------------------------------
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