1. 25 May, 2016 16 commits
  2. 24 May, 2016 5 commits
  3. 23 May, 2016 17 commits
  4. 22 May, 2016 2 commits
    • Marius Wachtler's avatar
      microptimization: mark _PyGC_generation0 as having a const address · 938b0190
      Marius Wachtler authored
      this is an advantage for _PyObject_GC_TRACK
      which before compiled to something like this:
              cmpq    $-2, -16(%rdi)
              jne     .LBB0_2
              movq    $-3, -16(%rdi)
              movq    _PyGC_generation0(%rip), %rax
              movq    %rax, -32(%rdi)
              movq    _PyGC_generation0(%rip), %rax
              movq    8(%rax), %rax
              movq    %rax, -24(%rdi)
              leaq    -32(%rdi), %rcx
              movq    %rcx, (%rax)
              movq    _PyGC_generation0(%rip), %rax
              movq    %rcx, 8(%rax)
      
      and now compiles to
              cmpq    $-2, -16(%rdi)
              jne     .LBB0_2
              movq    $-3, -16(%rdi)
              movq    _PyGC_generation0(%rip), %rax
              movq    %rax, -32(%rdi)
              movq    8(%rax), %rcx
              movq    %rcx, -24(%rdi)
              leaq    -32(%rdi), %rdx
              movq    %rdx, (%rcx)
              movq    %rdx, 8(%rax)
      
      notice that it had to load _PyGC_generation0 three times because the compiler had to assume that because of aliasing it got motified.
      (and this loads actually showed up in profiling as somewhat expensive)
      938b0190
    • Marius Wachtler's avatar
      Merge pull request #1198 from undingen/tuple_contains · 21ab994e
      Marius Wachtler authored
      tuple: implement tp_as_sequence->sq_contains
      21ab994e