Benchmarks between pg and pg-native
Is there any benchmarks, which would show how much performance difference between native and js implementation is?
Realistically, very little. Using the latest version, getting even a 10% bump is optimistic.
It's quite hard to figure out if one should or should not use it without benchmarks. Also, pg sends a warning if native is not available which doesn't help much.
pg sends a warning if native is not available
It shouldn't. What is the warning?
@vitaly-t This is the warning https://github.com/brianc/node-postgres/blob/master/lib/index.js#L52
@johanhenrikssn that error is only displayed when you try to require native without having it installed.
I've been using it for years, and never saw any error or warning when you are not trying to use native bindings without having it installed first.
I just recently made benchmarks and published a blog post. I was focusing on reading results in JSON, but it seems native is almost always slower. I think this is true always when there is anything to parse in JavaScript.