View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0038044 | FPC | Packages | public | 2020-11-05 20:43 | 2020-11-05 21:55 |
Reporter | prino | Assigned To | Michael Van Canneyt | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 3.3.1 | ||||
Summary | 0038044: Inefficient code | ||||
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? | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 47327 | ||||
FPCOldBugId | |||||
FPCTarget | 3.2.2 | ||||
Attached Files |
|
|
I doubt the difference will be noticeable in real-world situations, but I applied the change. Using inline is meanwhile discouraged, the idea is to make the compiler smart enough to know when it is advantageous to inline or not. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-05 20:43 | prino | New Issue | |
2020-11-05 21:35 | Bart Broersma | Project | Packages => FPC |
2020-11-05 21:55 | Michael Van Canneyt | Assigned To | => Michael Van Canneyt |
2020-11-05 21:55 | Michael Van Canneyt | Status | new => resolved |
2020-11-05 21:55 | Michael Van Canneyt | Resolution | open => fixed |
2020-11-05 21:55 | Michael Van Canneyt | Fixed in Version | => 3.3.1 |
2020-11-05 21:55 | Michael Van Canneyt | Fixed in Revision | => 47327 |
2020-11-05 21:55 | Michael Van Canneyt | FPCTarget | => 3.2.2 |
2020-11-05 21:55 | Michael Van Canneyt | Note Added: 0126764 |