Why is expat extremely fast?
David Gregorczyk <[email protected]> Tue, 10 Mar 2009 14:07:57 +0100
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Message-ID | <[email protected]> |
Hey guys, I'm a student from the University of Luebeck in Germany. For my diploma thesis I've just created a small xml parser of ca. 1000 lines of code and compared its speed to the expat parser. My results are poor: my parser's speed is only a half of expat's speed. I worked with an endless loop performing switch and if structures. Sometimes a callback function requests more buffer. Once the loop detects a final flag which is set to 1, it will parse the rest of the input stream and exit. The parser works fine but is so lame. What's the reason expat reaches such a great performance? I've tried to understand the source code and failed :-) It's just confusing me. There is so much functionality I do not perform... but my application is still slower. Is there any trick which makes expat so fast? I've searched the internet for an answer, no one could help me. Could you? Best regards and many thanks for your replies!