Message259563
> Why not combine my patch and Serhiy's? First we check if left & right are both longs. Then we check if they are unicode (for +). And then we have a fastpath for floats.
See my comment on Serhiy's patch. Maybe we can start by check that the type of both operands are the same, and then use PyLong_CheckExact and PyUnicode_CheckExact.
Using such design, we may add a _PyFloat_Add(). But the next question is then the overhead on the "slow" path, which requires a benchmark too! For example, use a subtype of int. |
|
Date |
User |
Action |
Args |
2016-02-04 14:01:39 | vstinner | set | recipients:
+ vstinner, lemburg, rhettinger, mark.dickinson, pitrou, casevh, serhiy.storchaka, yselivanov, josh.r, zbyrne |
2016-02-04 14:01:39 | vstinner | set | messageid: <1454594499.1.0.150189545222.issue21955@psf.upfronthosting.co.za> |
2016-02-04 14:01:39 | vstinner | link | issue21955 messages |
2016-02-04 14:01:38 | vstinner | create | |
|