Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
See also PR 9784 where Raymond shown assempler code generated for two variants. There is the similar difference on 64-bit platform with GCC 7.3: $ gcc -O3 -o issue28397 issue28397-2.c $ time ./issue28397-2 0 real 0m2,740s user 0m2,739s sys 0m0,000s $ time ./issue28397-2 1 real 0m2,449s user 0m2,449s sys 0m0,000s But with GCC 8.2 there is not a difference. $ time ./issue28397-2 0 real 0m2,498s user 0m2,498s sys 0m0,000s $ time ./issue28397-2 1 real 0m2,500s user 0m2,496s sys 0m0,004s Both versions generate the same code for tested functions, there are only minor differences in the main() function (some independent instructions are reordered). I don't know what is the cause of such difference. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue28397> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com