Hi hackers, >> Patch attached. > Added to next CF (https://commitfest.postgresql.org/33/3169/)
The proposed code casts `const` variables to non-`const`. I'm surprised MSVC misses it. Also, there were some issues with the code formatting. The corrected patch is attached. The patch is listed under the "Performance" topic on CF. However, I can't verify any changes in the performance because there were no benchmarks attached that I could reproduce. By looking at the code and the first message in the thread, I assume this is in fact a refactoring. Personally I don't believe that changes like: - for (int i = 0; i < nxids; i++) + int i; + for (i = 0; i < nxids; i++) .. or: - for (int index = myoff; index < arrayP->numProcs; index++) + numProcs = arrayP->numProcs; + for (index = myoff; index < numProcs; index++) ... are of any value, but other changes may be. I choose to keep the patch as-is except for the named defects and let the committer decide which changes, if any, are worth committing. I'm updating the status to "Ready for Committer". -- Best regards, Aleksander Alekseev
v3-0001-procarray-refactoring.patch
Description: Binary data