Re: [HACKERS] Constifying numeric.c's local vars
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] Constifying numeric.c's local vars |
| Дата | |
| Msg-id | 11630.1505131814@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | [HACKERS] Constifying numeric.c's local vars (Andres Freund <andres@anarazel.de>) |
| Ответы |
Re: [HACKERS] Constifying numeric.c's local vars
|
| Список | pgsql-hackers |
Andres Freund <andres@anarazel.de> 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 casted away in the constant
> definitions, but aside from just inlining the values, I don't quite see
> a better solution?
No, I don't either. I'm not sure that writing the constant inline would
produce the desired results - the compiler might well decide that it had
to be in read-write storage.
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
В списке pgsql-hackers по дате отправления: