1. How do I rebuild the library for 64 bit systems ?

You can't. AsmXml is written in 32 bit assembly. It must be completely re-written in order to be linked with 64 bit applications.

A 64 bit version is not planned yet.

2. Why fast parsing is important even if CPU is not the bottleneck ?

3. Why assembly ?

4. Why all in assembly ?

The main loop is a huge loop, with almost no subroutine call. It is a kind of big finite state automaton, so it is not really possible to write some parts in a high level language without losing the advantage of assembly.

5. Why not DOM and not SAX ?

Because it is not just a parser but a parser and a decoder.

DOM and SAX parsers, are not only slower at parsing but also they do only half of the job: you still have to perform some lookups and string comparisons to find attributes and elements. So you can not process XML document efficiently with these APIs.

Doing the parsging and decoding in one pass saves a lot of memory access and CPU time because elements and attributes are accessed in O(1) time.

6. Why in-situ parser ?

It saves a lot of copy. Strings are copied only when containing escape characters or when the text is fragmented because of comments, CDATA or Processing Instructions.

The strings are referenced with a pair of pointers (begin, end) and are not null terminated.

Converting values to null terminated strings would be a terrible waste of time when strings are numerical values or symbolic constants that will be stored as numbers.