"Kevin Grittner" <kevin.gritt...@wicourts.gov> writes: > If people aren't inclined to support this on the grounds of API > clarity, maybe we should do some sort of benchmark run while we have > a patch which applies cleanly before writing off the possible > performance impact, but I'm not sure what makes a good stress-test > for the affected code.
I don't doubt that just duplicating macros and inlineable functions is a wash performance-wise (in fact, in principle it shouldn't change the generated code at all). My objection is the one Robert already noted: it takes extra brain cells to remember which function/macro to use, and I have seen not a shred of evidence that that extra development/maintenance effort will be repaid. I think that "const" works materially better in C++ where you can overload foo(struct *) and foo(const struct *) and let the compiler sort out which is being called. In C, the impedance match is a lot worse, so you have to pick and choose where const is worth the trouble. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers