1. 06 Aug, 2013 1 commit
    • Raymond Hettinger's avatar
      Replace outdated optimization with clearer code that compiles better. · c629d4c9
      Raymond Hettinger authored
      Letting the compiler decide how to optimize the multiply by five
      gives it the freedom to make better choices for the best technique
      for a given target machine.
      
      For example, GCC on x86_64 produces a little bit better code:
      
      Old-way (3 steps with a data dependency between each step):
      
          shrq    $5, %r13
          leaq    1(%rbx,%r13), %rax
          leaq    (%rax,%rbx,4), %rbx
      
      New-way (3 steps with no dependency between the first two steps
               which can be run in parallel):
      
          leaq    (%rbx,%rbx,4), %rax     # i*5
          shrq    $5, %r13                # perturb >>= PERTURB_SHIFT
          leaq    1(%r13,%rax), %rbx      # 1 + perturb + i*5
      c629d4c9
  2. 05 Aug, 2013 8 commits
  3. 04 Aug, 2013 5 commits
  4. 03 Aug, 2013 1 commit
  5. 04 Aug, 2013 19 commits
  6. 03 Aug, 2013 6 commits