Re: NUMERIC private methods?
От
David Fetter
Тема
Re: NUMERIC private methods?
Дата
Msg-id
20141216133145.GB10843@fetter.org
Ответ на
Re: NUMERIC private methods? (Andrew Gierth)
Список
Дерево обсуждения
NUMERIC private methods? David Fetter <david@fetter.org>
Re: NUMERIC private methods? Heikki Linnakangas <hlinnakangas@vmware.com>
Re: NUMERIC private methods? Tom Lane <tgl@sss.pgh.pa.us>
Re: NUMERIC private methods? Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: NUMERIC private methods? Tom Lane <tgl@sss.pgh.pa.us>
Re: NUMERIC private methods? Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: NUMERIC private methods? Robert Haas <robertmhaas@gmail.com>
Re: NUMERIC private methods? Tom Lane <tgl@sss.pgh.pa.us>
Re: NUMERIC private methods? Bruce Momjian <bruce@momjian.us>
Re: NUMERIC private methods? Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: NUMERIC private methods? Bruce Momjian <bruce@momjian.us>
Re: NUMERIC private methods? Robert Haas <robertmhaas@gmail.com>
Re: NUMERIC private methods? Tom Lane <tgl@sss.pgh.pa.us>
Re: NUMERIC private methods? Robert Haas <robertmhaas@gmail.com>
Re: NUMERIC private methods? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: NUMERIC private methods? David Fetter <david@fetter.org>
Re: NUMERIC private methods? Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: NUMERIC private methods? David Fetter <david@fetter.org>
On Tue, Dec 16, 2014 at 09:01:47AM +0000, Andrew Gierth wrote: > >>>>> "Heikki" == Heikki Linnakangas writes: > > Heikki> Looking at the weighed_stats code, this probably illustrates > Heikki> the hoops you had to jump through: > > Actually that hoop-jumping expression is almost irrelevant. Right. Not that it made things fun or easy (at least for me) to debug, as you can see by the git history. > The part that hurts (and yes, it's performance that's at issue here, > and not code aesthetics) is not being able to use NumericVar in the > aggregate's transition variable, because that means that every > computed intermediate value is palloc'd and pfree'd twice (once as > the digit buffer of a NumericVar and again as a Numeric datum). Yep. Performance of NUMERIC might yet get some of the love it deserves. Perhaps something along the lines of a 128-bit default structure with a promotion/demotion scheme for larger representations. Until then, those of us writing extensions are stuck with heaps of extra instructions in it that could easily be trimmed away to good effect. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
В списке pgsql-hackers по дате отправления