You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all. As an exercise I rewrote an extension similar to pg_stats_statements where the extension counts the number of queries fired in a given time period. When benchmarking my Rust extension using PGRX against the extension written in C, I found about a ~10% decrease in total queries being fired, which to me indicates a slight overhead that PGRX had. Not sure if there is any similar discourse that exists on this topic, but just wanted to share my findings and see if anyone else has run a benchmark on comparing Rust and C extensions for postgres. On the discord, a couple users have discussed that the overhead can perhaps be attributed to SPI and variable types.
The text was updated successfully, but these errors were encountered:
Remove #[pg_guard] annotations and see what happens. I'm not recommending this for production -- pg_guard is pretty important for safety -- but it may account for the difference.
Hi all. As an exercise I rewrote an extension similar to pg_stats_statements where the extension counts the number of queries fired in a given time period. When benchmarking my Rust extension using PGRX against the extension written in C, I found about a ~10% decrease in total queries being fired, which to me indicates a slight overhead that PGRX had. Not sure if there is any similar discourse that exists on this topic, but just wanted to share my findings and see if anyone else has run a benchmark on comparing Rust and C extensions for postgres. On the discord, a couple users have discussed that the overhead can perhaps be attributed to SPI and variable types.
The text was updated successfully, but these errors were encountered: