5 ms·
Some nice optimisations included: Added two new opcodes: LOAD_METHOD and CALL_METHOD to avoid instantiation of bound method objects for method calls, which
by Twirrim 9y ago
Some nice optimisations included:
Added two new opcodes: LOAD_METHOD and CALL_METHOD to avoid instantiation of bound method objects for method calls, which results in method calls being faster up to 20%. (Contributed by Yury Selivanov and INADA Naoki in bpo-26110.)
Searching some unlucky Unicode characters (like Ukrainian capital “Є”) in a string was to 25 times slower than searching other characters. Now it is slower only by 3 times in worst case. (Contributed by Serhiy Storchaka in bpo-24821.)
Fast implementation from standard C library is now used for functions erf() and erfc() in the math module. (Contributed by Serhiy Storchaka in bpo-26121.)
The os.fwalk() function has been sped up by 2 times. This was done using the os.scandir() function. (Contributed by Serhiy Storchaka in bpo-25996.)
Optimized case-insensitive matching and searching of regular expressions. Searching some patterns can now be up to 20 times faster. (Contributed by Serhiy Storchaka in bpo-30285.)
selectors.EpollSelector.modify(), selectors.PollSelector.modify() and selectors.DevpollSelector.modify() may be around 10% faster under heavy loads. (Contributed by Giampaolo Rodola’ in bpo-30014)
edit:
That one around the unlucky Unicode characters is fascinating. https://bugs.python.org/issue24821 https://bugs.python.org/issue24821
Due to the way that regex searching is optimised, it trips up because:
".. the lowest byte of the code of Ukrainian capital letter Є (U+0404) matches the highest byte of codes of most Cyrillic letters (U+04xx). There are similar issues with some other scripts ..."