evilsong / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

patch: speed up tcmalloc by reducing the number of "ifs" on hot paths #488

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I made modifications similar to these on the Google-internal version of 
tcmalloc, and we saw some decent speed improvements, both on microbenchmarks 
and big programs.

The idea is to improve the speed of the "Is everything initialized?" code, 
that's at the start of all allocations and deallocations.

Patch attached.  Again, it assumes LIKELY and UNLIKELY are available, but you 
can do without those easily enough.

Original issue reported on code.google.com by gp...@chromium.org on 6 Dec 2012 at 11:08

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by chapp...@gmail.com on 22 Dec 2012 at 5:52

GoogleCodeExporter commented 9 years ago
r184 | chappedm@gmail.com | 2012-12-22 13:34:43 -0500 (Sat, 22 Dec 2012) | 7 
lines

issue-488: Performance improvement for initialization checks

These came in from the Google-internal version of tcmalloc. They saw some
decent speed improvements, both on microbenchmarks and big programs. The
idea is to improve the speed of the "Is everything initialized?" type of
code, that's at the start of all allocations and deallocations.

Original comment by chapp...@gmail.com on 22 Dec 2012 at 6:35