From 74734f73ca3cdb48d4d51139512b6828c2734252 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sun, 26 Aug 2018 19:38:31 -0500 Subject: [PATCH] Fast path for exact floats in math.hypot() and math.dist() (GH-8949) --- Modules/mathmodule.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 2d483afff5..62d327998f 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -2134,14 +2134,22 @@ math_dist_impl(PyObject *module, PyObject *p, PyObject *q) } for (i=0 ; i