You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2001/10/26 11:59:47 UTC
DO NOT REPLY [Bug 4442] New: -
BinMemInputStream::readBytes is inefficient
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4442>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4442
BinMemInputStream::readBytes is inefficient
Summary: BinMemInputStream::readBytes is inefficient
Product: Xerces-C++
Version: Nightly build
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Utilities
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: mlovett@uk.ibm.com
While profiling Xerces, we identified a significant CPU spike in the
BinMemInputStream, when we copy some data from one buffer to another:
< for (unsigned int index = 0; index < actualToRead; index++)
< toFill[index] = fBuffer[fCurIndex++];
replacing this with:
> memcpy(toFill, &fBuffer[fCurIndex], actualToRead);
> fCurIndex += actualToRead;
gave a 2% overall increase in our application throughput, and removed the
spike from the profile.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org