Re: [xml] xmlbench Benchark results...



But of course all such discussions are premature until such time as someone
runs the same benchmarks under a profiler and finds out exactly where the
time is being spent.






Luca Padovani <lpadovan cs unibo it> on 03/19/2003 04:50:23 PM

To:   Sander Vesik <sander_traveling yahoo co uk>
cc:   "xml gnome org" <xml gnome org>, Sean Chittenden
      <sean chittenden org> (bcc: Fred Smith/Computrition)
Subject:  Re: [xml] xmlbench Benchark results...




On Wed, 2003-03-19 at 14:48, Sander Vesik wrote:
if all (and i do mean absolutely all, except for a small amount of very
trivial and limited cases) used ref counted strings, then you could
replace
string compares with pointer compares.
I remember we went into this discussion with Daniel as well. But when I
say "string sharing" I don't think at all at reference counting, which
would imply to change libxml2 API and would make the C code an
unmanageable mess. If you do sharing uniformly, you simply know that
strings are shared in a centralized data structure that you can protect
with a write-only mutex (the critical section would be protected only
when creating a new element or attribute, so I presume this kind of
access quickly approaches zero after you've loaded your document and a
stylesheet). In order to deallocate strings that aren't used anymore,
you can associate to each string the list of documents using it, and
free the string as soon as this list becomes null (this is just an
example, there might be alternative ways of doing this).
Hope to find the time to investigate this further at some point.
-- luca


_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml







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