]> granicus.if.org Git - python/commitdiff
Issue #26288: Fix comment
authorYury Selivanov <yselivanov@sprymix.com>
Sat, 6 Feb 2016 17:21:33 +0000 (12:21 -0500)
committerYury Selivanov <yselivanov@sprymix.com>
Sat, 6 Feb 2016 17:21:33 +0000 (12:21 -0500)
Objects/longobject.c

index c1edeacf62e0f51c2e3d88f46cf89086ad71a53b..f3afb109f760ad73bf6d0f741a6ced7ba3c9ef7d 100644 (file)
@@ -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);
     }