• Jan Möbius's avatar
    More efficient implementation of opposite_halfedge handle · f5d25606
    Jan Möbius authored
    Old code compiled to
       0x00000000004594a0 <+0>:    lea    -0x1(%rsi),%edx
       0x00000000004594a3 <+3>:    lea    0x1(%rsi),%eax
       0x00000000004594a6 <+6>:    and    $0x1,%esi
       0x00000000004594a9 <+9>:    cmovne %edx,%eax
       0x00000000004594ac <+12>:    retq
    
    New code creates
       0x00000000004594a0 <+0>:    mov    %esi,%eax
       0x00000000004594a2 <+2>:    xor    $0x1,%eax
       0x00000000004594a5 <+5>:    retq
    
    So no conditionals, jumps and fewer instructions
    
    closes #5
    f5d25606