diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2018-09-29 21:30:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-29 21:30:38 (GMT) |
commit | df8101517aa1c917fdf8aeb466e480c26d4e878c (patch) | |
tree | 5ad880fe895f2fbb0669678fcde28cd2fe8e4072 /Modules/clinic | |
parent | e45473e3ca31e5b78dc85cab575f5bb60d5b7f8f (diff) | |
download | cpython-df8101517aa1c917fdf8aeb466e480c26d4e878c.zip cpython-df8101517aa1c917fdf8aeb466e480c26d4e878c.tar.gz cpython-df8101517aa1c917fdf8aeb466e480c26d4e878c.tar.bz2 |
Speed-up math.dist() by 30% (GH-9628)
Diffstat (limited to 'Modules/clinic')
-rw-r--r-- | Modules/clinic/mathmodule.c.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/clinic/mathmodule.c.h b/Modules/clinic/mathmodule.c.h index c4d2786..b40a227 100644 --- a/Modules/clinic/mathmodule.c.h +++ b/Modules/clinic/mathmodule.c.h @@ -294,8 +294,9 @@ math_dist(PyObject *module, PyObject *const *args, Py_ssize_t nargs) PyObject *p; PyObject *q; - if (!_PyArg_ParseStack(args, nargs, "O!O!:dist", - &PyTuple_Type, &p, &PyTuple_Type, &q)) { + if (!_PyArg_UnpackStack(args, nargs, "dist", + 2, 2, + &p, &q)) { goto exit; } return_value = math_dist_impl(module, p, q); @@ -522,4 +523,4 @@ math_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject exit: return return_value; } -/*[clinic end generated code: output=d936137c1189b89b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=239c51a5acefbafb input=a9049054013a1b77]*/ |