Re: [GENERAL] Is float8 a reference type?
От | Tom Lane |
---|---|
Тема | Re: [GENERAL] Is float8 a reference type? |
Дата | |
Msg-id | 27465.1506184824@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [GENERAL] Is float8 a reference type? (Paul A Jungwirth <pj@illuminatedcomputing.com>) |
Ответы |
Re: [GENERAL] Is float8 a reference type?
|
Список | pgsql-general |
Paul A Jungwirth <pj@illuminatedcomputing.com> writes: > Since I'm expecting ~10 million elements per array, it seems like > skipping the conversion will have a real effect. I checked the > assembly and do see a difference (on both Mac+clang and Linux+gcc). I wonder whether you're using up-to-date Postgres headers (ones where Float8GetDatum is a static inline function). For me, both of those platforms recognize it as a no-op --- in fact, clang turns a loop like for (i = 0; i < n; i++) { datums[i] = Float8GetDatum(floats[i]); } into something that looks suspiciously like an inlined, loop-unrolled memcpy(). regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления: