This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients rhettinger, serhiy.storchaka, sir-sigurd, skrah, socketpair, vstinner
Date 2018-10-10.12:03:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539173012.32.0.788709270274.issue28397@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-10-10 12:03:32serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, vstinner, skrah, socketpair, sir-sigurd
2018-10-10 12:03:32serhiy.storchakasetmessageid: <1539173012.32.0.788709270274.issue28397@psf.upfronthosting.co.za>
2018-10-10 12:03:32serhiy.storchakalinkissue28397 messages
2018-10-10 12:03:32serhiy.storchakacreate