Inefficient code
Original Reporter info from Mantis: prino
-
Reporter name:
Original Reporter info from Mantis: prino
- Reporter name:
Description:
fpcbuild-3.2.0.zip\fpcbuild-3.2.0\fpcsrc\packages\rtl-objpas\src\inc\strutils.pp, lines 358 & 496:
while (aPattern[aPos-i] = aPattern[aPatternSize-1-i]) and (i < aPos) do begin
Not a bug, but anyone with any sense would reverse the two tests, given that the first is far more computationally intensive.
And why isn't "ResizeAllocatedMatches" inlined?
Mantis conversion info:
- Mantis ID: 38044
- Build: All
- Fixed in version: 3.3.1
- Fixed in revision: 47327 (#51c37873)
- Target version: 3.2.2