[PATCH] D24991: Inline hot functions in libcxx shared_ptr implementation.

Sebastian Pop via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 28 12:22:53 PST 2016


sebpop added a comment.

@mclow.lists could you please have a last look at this patch: the change is for a performance improvement (20% uplift on a proprietary benchmark), and all the issues mentioned in the review have been addressed.
The existing synthetic benchmark shows an overall improvement:

  master:
  Benchmark                          Time           CPU Iterations
  ----------------------------------------------------------------
  BM_SharedPtrCreateDestroy         54 ns         54 ns   12388755
  BM_SharedPtrIncDecRef             37 ns         37 ns   19021739
  BM_WeakPtrIncDecRef               38 ns         38 ns   18421053
   
  master + patch:
  Benchmark                          Time           CPU Iterations
  ----------------------------------------------------------------
  BM_SharedPtrCreateDestroy         44 ns         44 ns   14730639
  BM_SharedPtrIncDecRef             18 ns         18 ns   38888889
  BM_WeakPtrIncDecRef               30 ns         30 ns   23648649


https://reviews.llvm.org/D24991





More information about the cfe-commits mailing list