Skip to content
  • Douglas Gregor's avatar
    f829825d
    Some micro-optimizations for DISABLE_SMART_POINTERS: · f829825d
    Douglas Gregor authored
      - When it's safe, ActionResult uses the low bit of the pointer for
      the "invalid" flag rather than a separate "bool" value. This keeps
      GCC from generating some truly awful code, for a > 3x speedup in the
      result-passing microbenchmark.
      - When DISABLE_SMART_POINTERS is defined, store an ActionResult
      within ASTOwningResult rather than an ASTOwningPtr. Brings the
      performance benefits of the above to smart pointers with
      DISABLE_SMART_POINTERS defined.
    
    Sadly, these micro-benchmark performance improvements don't seem to
    make much of a difference on Cocoa.h right now. However, they're
    harmless and might help with future optimizations.
    
    llvm-svn: 63061
    f829825d
    Some micro-optimizations for DISABLE_SMART_POINTERS:
    Douglas Gregor authored
      - When it's safe, ActionResult uses the low bit of the pointer for
      the "invalid" flag rather than a separate "bool" value. This keeps
      GCC from generating some truly awful code, for a > 3x speedup in the
      result-passing microbenchmark.
      - When DISABLE_SMART_POINTERS is defined, store an ActionResult
      within ASTOwningResult rather than an ASTOwningPtr. Brings the
      performance benefits of the above to smart pointers with
      DISABLE_SMART_POINTERS defined.
    
    Sadly, these micro-benchmark performance improvements don't seem to
    make much of a difference on Cocoa.h right now. However, they're
    harmless and might help with future optimizations.
    
    llvm-svn: 63061
Loading