Stefan Krah added the comment: In the following program, with gcc-5.3 doit() is significantly faster than doit2() in 64-bit Linux:
================================================================ #include <stdint.h> int doit(int64_t index, int64_t nitems) { return index < 0 || index >= nitems; } int doit2(int64_t index, int64_t nitems) { return (uint64_t)index >= (uint64_t)nitems; } int main(void) { int count, i; for (i = 0; i < 1000000000; i++) { count += doit(832921, i); } return count; } ================================================================ ---------- _______________________________________ 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