This performance improvement isn't related to a specific user problem
report, so I am going to hold it for 7.4. At that time we can also
research whether palloc0 should be used in other cases, like palloc
followed by MemSet.
The only issue there is that palloc0 can't optimize away constants used
in the macro so it may be better _not_ to make that change. Neil, do
you have any performance numbers comparing MemSet with constant vs.
variable parameters, e.g:
MemSet(ptr, 0, 256)
vs.
i = 256;
MemSet(ptr, 0, i)
--
Bruce Momjian | http://candle.pha.pa.us
pg...@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majo...@postgresql.org
No question 1024 looks wrong on a lot of platforms. On Sparc, we were
seeing a crossover even higher, and on many like BSD/OS, the crossover
is much lower. Without some platform-specific test, I don't know how we
are going to set this correctly. Should we develop such a test? Do we
have enough MemSet usage in the 256-4k range that people would see a
difference between different MEMSET_LOOP_LIMIT values?