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
There are now dumper/loader to adapt Python Decimal to Postgres numeric in binary format, implemented both in C and in Cython.
These methods however are about the 30% slower than the text format adapters (at least the dumper). The problem is that, even in C, the binary dumper uses the Decimal.as_tuple() method, which is relatively slow.
An API to access the Decimal C values should be available in Python 3.10: https://bugs.python.org/issue41324 The C adapters should use it.
There is a draft of a branch where I was thinking to use the mpdec directly, but this would complicate the build at it requires the libmpdec-dev package. So it's probably a bad idea.
The text was updated successfully, but these errors were encountered:
There are now dumper/loader to adapt Python Decimal to Postgres numeric in binary format, implemented both in C and in Cython.
These methods however are about the 30% slower than the text format adapters (at least the dumper). The problem is that, even in C, the binary dumper uses the
Decimal.as_tuple()
method, which is relatively slow.An API to access the Decimal C values should be available in Python 3.10: https://bugs.python.org/issue41324 The C adapters should use it.
There is a draft of a branch where I was thinking to use the
mpdec
directly, but this would complicate the build at it requires thelibmpdec-dev
package. So it's probably a bad idea.The text was updated successfully, but these errors were encountered: