I have implemented progman3k's ideas in an enhanced version of TiXmlString.
It does indeed speed up the loading of files, BIG time.
This is the proposal I do for non-STL speed issues.
Check it out in CVS (1.9 of tinystr.h and tinystr.cpp) and tell me what you think
Yves
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-01-23
As you can see in the benchmarks.htm file I've sent you, using both stack (default size 64b) an heap buffers pretty much doubled loading performance as opposed to just using the heap (class TiXml_String in tinyxmlstr.h). e.g.: loading hamlet.xml in ~160ms vs ~340ms
Most strings found in xml are so short that searching the heap for free memory wastes a lot of time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have implemented progman3k's ideas in an enhanced version of TiXmlString.
It does indeed speed up the loading of files, BIG time.
This is the proposal I do for non-STL speed issues.
Check it out in CVS (1.9 of tinystr.h and tinystr.cpp) and tell me what you think
Yves
As you can see in the benchmarks.htm file I've sent you, using both stack (default size 64b) an heap buffers pretty much doubled loading performance as opposed to just using the heap (class TiXml_String in tinyxmlstr.h). e.g.: loading hamlet.xml in ~160ms vs ~340ms
Most strings found in xml are so short that searching the heap for free memory wastes a lot of time.