|
On Fri, Sep 14, 2012 at 7:45 AM, Åke Olsson <ake.olsson@xxxxxx> wrote:
As for the XML message creation this is done by regular
string handling, building the MQ message step by step.
I have a hard time finding anything horribly wrong there either.
Actually, I have found that there can be a drastic difference in
performance between different approaches to string handling. You may
be inadvertently using a "Schlemiel" algorithm:
http://en.wikipedia.org/wiki/Schlemiel_the_Painter%27s_algorithm
I can't give you an exact example from RPG at the moment because I'm
out of the office, but I encountered this when I was writing a very
string-intensive RPG program. I remember that initially, how I was
building longer strings was just painfully slow. I tried various
different things until suddenly I got something like a 10-fold speed
increase. I knew at that point I must have just gotten rid of
Schlemiel.
I don't think it's necessarily obvious where Schlemiel is; oftentimes
it's an under-the-covers implementation detail in a high-level
language. We could use a certain HLL construct because it's
conveniently provided for us, but that construct might not be
implemented as efficiently as it could be.
John
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.