Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons - Mailing list pgsql-hackers

From Florian Weimer
Subject Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons
Date
Msg-id 828w07rq9v.fsf@mid.bfk.de
Whole thread Raw
In response to Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
* Tom Lane:

> Yeah.  You certainly don't want to do the division sequence twice,
> and a log() call wouldn't be cheap either, and there don't seem to
> be many other alternatives.

What about a sequence of comparisons, and unrolling the loop?  That
could avoid the final division, too.  It might also be helpful to
break down the dependency chain for large input values.

The int8 version should probably work in 1e9 chunks and use a
zero-padding variant of the 32-bit code.

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


pgsql-hackers by date:

Previous
From: Alexey Klyukin
Date:
Subject: Re: Another proposal for table synonyms
Next
From: Andrew Dunstan
Date:
Subject: Re: WIP patch for parallel pg_dump