Opened 12 years ago
Closed 12 years ago
#20145 closed Cleanup/optimization (wontfix)
Use cdecimal for DecimalField if available
Reported by: | Dmitry Gladkov | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.5 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
cdecimal is a drop-in replacement for decimal.py offering far better performace and has been included into Python 3.3.
Attachments (2)
Change History (3)
by , 12 years ago
Attachment: | ticket20145.diff added |
---|
by , 12 years ago
Attachment: | ticket20145-2.diff added |
---|
comment:1 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
This isn't backwards compatible. The C version is not interoperable with the pure python version, so if anywhere in your code you have something like model.some_decimal_field = Decimal("1.0")
your code will silently break. If you upgrade to Python 3.3 you'll automatically get the benefit of this, so I think the backwards compatibility concern isn't worth it, therefore I'm marking as wontfix.
updated patch