The top one is pgx, the bottom is Postgres. So there's a little room for improvement here with pgx, but that's okay for a v0.0.3 release.
test=# select count(*) from srf.generate_series(1, 10000000);
Time: 1552.115 ms (00:01.552)
test=# select count(*) from generate_series(1, 10000000);
Time: 1406.357 ms (00:01.406)
The largest part of the time executing the above query isn't inside the function, so this isn't that a material comparison. The reason for that is that SRFs in FROM to be materialized into a tuplestore, which isn't free:
The top one is pgx, the bottom is Postgres. So there's a little room for improvement here with pgx, but that's okay for a v0.0.3 release.