RE: [xml] libXml speed and memory use (v Xerces)

Benchmarking is a notoriously difficult thing to do well; so much depends on
the particulars.  Your benchmark may be a better or worse reflection of your
actual use case(s) than the one on SourceForge.

Bear in mind that the benchmark is a bit dated.  It compares Xerces 2.1 and
libxml2 2.4.30; current versions are 2.3 and 2.5.8 respectively.  The Xerces
crew has done a fair amount of performance tuning since 2.1, especially in

-----Original Message-----
From: Vincent Finn [mailto:vincent finn automsoft com] 
Sent: Friday, July 18, 2003 12:49 PM
To: 'xml gnome org'
Subject: [xml] libXml speed and memory use (v Xerces)


On the web page for libXml there are time comparisons given 
between it and
and lib comes out ahead

I am comparing it to xerces (not in a very sophisticated way) 
and getting
very different results

I'll put my code and results at the bottom but basically xerces uses
substantially less memory
and is noticeably quicker

Are there any optimisations in building of libXml2.dll that 
can be switched
on and off for performance?

since I might have expected one or the other to be worse but 
not both !!

Here is the code I used

      int iStartTime = time(NULL);
      int const c_iIterations = (int)1e4;
      for (int i = 0; i < c_iIterations; ++i)
              xmlDocPtr test = xmlParseFile(strFileName.c_str());
      int iEndTime = time(NULL) - iStartTime;

      Memory use 2,154,496 bytes
      time taken 120 seconds


      int iStartTime = time(NULL);
      int const c_iIterations = (int)1e4;
      for (int i = 0; i < c_iIterations; ++i)
              XercesDOMParser test;
              DOMDocument* doc = test.getDocument();
      int iEndTime = time(NULL) - iStartTime;
      Memory use 1,851,393 bytes
      time taken 95 seconds
xml mailing list, project page
xml gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]