Re: [HACKERS] Constifying numeric.c's local vars

2017-09-11 Thread Tom Lane
Andres Freund writes: > One large user of unnecessary non-constant static variables is > numeric.c. More out of curiosity - numeric is slow enough in itself to > make inlining not a huge win - I converted it to use consts. LGTM. > It's a bit ugly that some consts have to be

[HACKERS] Constifying numeric.c's local vars

2017-09-10 Thread Andres Freund
Hi, For JIT inlining currently functions can't be inlined if they reference non-constant static variables. That's because there's no way, at least none I know of, to link to the correct variable, instead of duplicating, the linker explicitly renames symbols after all (that's the whole point of