[fpc-devel] patch for ReadInteger in sysformt.inc
Markus Beth
markus.beth at zkrd.de
Sun Sep 7 14:02:06 CEST 2008
Hi,
latest profiling of one of our FPC applications showed ReadInteger (in
rtl/objpas/sysutils/sysformt.inc) to be a performance bottleneck. Using
Pos(Fmt[chpos],'1234567890')<>0 to check if Fmt[chpos] is a digit is
somewhat time consuming. I replaced it with two char comparisons with
'0' and '9'.
The rest of the patch only unifies the casing of the variable chpos.
Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: readinteger.patch
Type: text/x-patch
Size: 3047 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20080907/dbc01492/attachment.bin>
More information about the fpc-devel
mailing list