Re: Shave a few cycles off our ilog10 implementation

From: David Fetter <david(at)fetter(dot)org>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Shave a few cycles off our ilog10 implementation
Date: 2024-10-30 20:02:21
Message-ID: ZyKQza0H7fj2ae1J@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 30, 2024 at 09:54:20PM +0200, Heikki Linnakangas wrote:
> On 30/10/2024 21:27, David Fetter wrote:
> > Please find attached a patch to $Subject
> >
> > I've done some preliminary testing, and it appears to shave somewhere
> > between 25-50% off the operations themselves, and these cascade into
> > things like formatting result sets and COPY OUT.
>
> Impressive! What did you use to performance test it, to get those results?

In case that wasn't clear, what I've tested so far was the ilog10
implementations, not the general effects on the things they underlie.

This testing was basically just sending a bunch of appropriately sized
pseudo-random uints in a previously created array sent through a tight
loop that called the ilog10s and getting average execution times.

Any suggestions for more thorough testing would be welcome.

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2024-10-30 20:14:12 Re: Shave a few cycles off our ilog10 implementation
Previous Message Heikki Linnakangas 2024-10-30 19:54:20 Re: Shave a few cycles off our ilog10 implementation