New submission from Julian <julian@hille.family>:
There seems to be a performance issue when creating a Mock() object from unittest module. The performance difference between 3.7.x and 3.8.0 is about 7-8 times slower in 3.8 Heres the smalles sample i could generate: Using python 3.7.5 ``` python3 -m timeit -v --number=100000 --setup="from unittest.mock import Mock" "Mock()" raw times: 2.99 sec, 2.96 sec, 3.33 sec, 2.98 sec, 2.92 sec 100000 loops, best of 5: 29.2 usec per loop ``` Using python 3.8.0 ``` python3 -m timeit -v --number=100000 --setup="from unittest.mock import Mock" "Mock()" raw times: 16.9 sec, 17 sec, 17.7 sec, 18.1 sec, 16.3 sec 100000 loops, best of 5: 163 usec per loop ``` I did not find that issue, but a co-worker. ---------- messages: 357297 nosy: julianhille priority: normal severity: normal status: open title: performance degradation creating a mock object type: performance versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38895> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com