summaryrefslogtreecommitdiffstats
path: root/Objects/longobject.c
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2016-02-06 17:21:33 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2016-02-06 17:21:33 (GMT)
commita0fcaca4e1c29078f578fb96971398c70cf38900 (patch)
treeab9f18273d47519095aab7fc002e8dcd6635d21d /Objects/longobject.c
parent029f7f7af2d23e34ae875489426185ce75c0e121 (diff)
downloadcpython-a0fcaca4e1c29078f578fb96971398c70cf38900.zip
cpython-a0fcaca4e1c29078f578fb96971398c70cf38900.tar.gz
cpython-a0fcaca4e1c29078f578fb96971398c70cf38900.tar.bz2
Issue #26288: Fix comment
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index c1edeac..f3afb10 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -2770,9 +2770,9 @@ PyLong_AsDouble(PyObject *v)
return -1.0;
}
if (Py_ABS(Py_SIZE(v)) <= 1) {
- /* Fast path; single digit will always fit decimal.
- This improves performance of FP/long operations by at
- least 20%. This is even visible on macro-benchmarks.
+ /* Fast path; single digit long (31 bits) will cast safely
+ to double. This improves performance of FP/long operations
+ by 20%.
*/
return (double)MEDIUM_VALUE((PyLongObject *)v);
}