New submission from Alex Henrie <alexhenri...@gmail.com>:
The delta_new function in _datetimemodule.c currently contains the following code: /* Round to nearest whole # of us, and add into x. */ double whole_us = round(leftover_us); int x_is_odd; PyObject *temp; whole_us = round(leftover_us); The second call to the round function produces the same result as the first call and can therefore be safely eliminated. ---------- components: Library (Lib) messages: 359465 nosy: alex.henrie priority: normal severity: normal status: open title: Redundant call to round in delta_new type: performance versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39237> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com