Re: Improve performance of pg_strtointNN functions
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: John Naylor <john.naylor@enterprisedb.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, Dean Rasheed <dean.a.rasheed@gmail.com>
Date: 2022-12-04T00:52:03Z
Lists: pgsql-hackers
On Fri, 2 Dec 2022 at 20:35, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote: > If we are happy with this patch, then it's okay with me if you push this > first. I'll probably need to do another pass over my patch anyway, so a > bit more work isn't a problem. Thanks. I'll start looking at the patch again now. If I don't find any problems then I'll push it. I just did some performance tests by COPYing in 40 million INTs ranging from -/+ 20 million. create table ab(a int, b int); insert into ab select x,x from generate_series(-20000000,20000000)x; copy ab to '/tmp/ab.csv'; -- master truncate ab; copy ab from '/tmp/ab.csv'; Time: 10219.386 ms (00:10.219) Time: 10252.572 ms (00:10.253) Time: 10202.940 ms (00:10.203) -- patched truncate ab; copy ab from '/tmp/ab.csv'; Time: 9522.020 ms (00:09.522) Time: 9441.294 ms (00:09.441) Time: 9432.834 ms (00:09.433) About ~8% faster David
Commits
-
Fix thinko introduced in 6b423ec67
- 8692f6644e71 16.0 landed
-
Improve performance of pg_strtointNN functions
- 6b423ec677d6 16.0 landed