Stefan Krah added the comment: On 64-bit Linux there's no difference:
$ ./usr/bin/gcc -O3 -o issue28397-2 issue28397-2.c $ time ./issue28397-2 0 real 0m2.486s user 0m2.424s sys 0m0.014s $ time ./issue28397-2 1 real 0m2.433s user 0m2.422s sys 0m0.008s Also, most of the time "index < 0 || index >= nitems" *is* inlined, and it was at least three times faster here. I guess the general point is that such micro-optimizations are unpredictable on modern architectures and modern compilers. Note that the fast inlined version used SSE instructions. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28397> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com