Message393395
| Author |
piro |
| Recipients |
mark.dickinson, mattip, piro, pitrou, rhettinger, skrah |
| Date |
2021年05月10日.13:46:53 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1620654414.09.0.282161896289.issue41324@roundup.psfhosted.org> |
| In-reply-to |
| Content |
FYI, will try to use this API in psycopg3, which supports the PostgreSQL decimal binary format. Thank you very much: it seems exactly what needed.
Binary conversion with Python Decimal currently has disappointing performances and is slower than the text format conversion. This is likely caused by the use of Decimal.as_tuple(), which creates tuples for the return value and the digits and requires Python calls to access their values.
I have considered using libmpdec directly: personally I wouldn't be opposed to that, but the additional dependency on libmpdec-dev would earn the project no new fan :\
Ref. https://github.com/psycopg/psycopg3/issues/54 |
|