Shout out to grapeseed oil
test=# SELECT count(*) FROM (SELECT generate_series(1, 10000000)) s;
count
----------
10000000
(1 row)
Time: 399.630 ms
test=# SELECT count(*) FROM (SELECT srf.generate_series(1, 10000000)) s;
count
----------
10000000
(1 row)
Time: 478.194 ms
Thanks for the reply. I'm not surprised there's room for optimization in pgx, especially in the Iterator-->SRF path.