Re: [HACKERS] pow support for pgbench
rmrodriguez@carto.com
From: Raúl Marín Rodríguez <rmrodriguez@carto.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Robert Haas <robertmhaas@gmail.com>,
Michael Paquier <michael.paquier@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2017-12-27T00:45:04Z
Lists: pgsql-hackers
Attachments
- pgbench_pow_v10.patch (text/x-patch) patch v10
- pgbench_pow_v10_ipow_overflow.patch (text/x-patch) patch v10
Hi, I've implemented the overflow checks and made some benchmarks and the ipow() version became slower except with some specific inputs (base 0 for example). It's true that the new auxiliary functions could be optimized, but I don't think it makes sense to keep working on them just to match pow() speed. I'm attaching both patches in case someone wants to have a look but I would go with the simpler solution (pgbench_pow_v10.patch). Regards, -- *Raúl Marín Rodríguez *carto.com
Commits
-
Add pow(), aka power(), function to pgbench.
- 7a727c180aa3 11.0 landed
-
pgbench: Support double constants and functions.
- 86c43f4e22c0 9.6.0 cited