June 2, 2016
7:57 a.m.
On 2016-06-02 05:43, Robert Bradshaw wrote:
2. "x || y" because Cython's "x or y" generates complicated code which isn't optimized as well as "x || y".
I just tried using gcc -O3 and the resulting assembly is identical.
Well, that would depend on what x and y are. A very concrete example: "if isinstance(x, (int,long))", which is parsed as "if PyInt_Check(x) or PyLong_Check(x)" is slightly slower than "if PyInt_Check(x) || PyLong_Check(x)".