News for hackers. Stuff that matters.
Re:Pg8000 – Pure-Python PostgreSQL driver by dragonwriter on Friday May 14, 2021 @06:35AM (#27152767)
> That’s surprising if your app spent most of the time in database calls, since 1) native code is still faster than pypy and 2) most of the time spent in database libraries is spent waiting for the database to return

I would argue a speedup (though maybe not a “massive” one) from pure python over a native extension is not that surprising, specifically because of (2), which makes it possible for the runtime-extension interface overhead to be more significant than (1). Native extensions tend to give a speed boost for computationally intensive tasks, but can’t really wait any faster, and aren’t free of overhead.

There are no comments on this comment yet.