Message388702
> The performance thoughts were motivated by the idea of
> making NaN a singleton: adding a check to
> PyFloat_FromDouble would mean that almost every operation
> that produced a float would have to pass through that check.
It may suffice to move the check upstream from PyFloat_FromDouble so that float('NaN') alway produces identically the same object as math.nan.
That would handle the common cases where NaN is used for missing values or is generated from string conversions. We don't need a bullet-proof solution, just mitigation of harm. |
|
Date |
User |
Action |
Args |
2021-03-15 02:53:09 | rhettinger | set | recipients:
+ rhettinger, tim.peters, mark.dickinson, congma |
2021-03-15 02:53:09 | rhettinger | set | messageid: <1615776789.21.0.172680059332.issue43475@roundup.psfhosted.org> |
2021-03-15 02:53:09 | rhettinger | link | issue43475 messages |
2021-03-15 02:53:09 | rhettinger | create | |
|