This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] optional fast iterators for set/map in libstdc++


> Why do this?  Because it speeds up 447.dealII from SPEC CPU2006.  On
> powerpc64-linux, the speedup over our usual peak options is 32% for
> -m32, 26% for -m64.  The two other CPU2006 benchmarks that use set
> and/or map are omnetpp and xalancbmk, which speed up between 1% and
> 1.4%.  Those speedups are based on the the middle result from 3 runs,
> using mainline from a couple of months ago.  I have not yet run
> benchmarks and any other targets.

This looks almost like threaded trees (see GNU libavl), which can be
implemented using only 2 bits rather than 16 bytes of overhead (and then
you can in principle get rid of the parent pointer, and end up actually
saving memory).  I'm not sure about the speed benefits of threaded
trees, but +33% in the overhead is quite dramatic.

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]