https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119482

--- Comment #13 from ak at gcc dot gnu.org ---
This patch gives another 23% speedup due to reducing time handling the linked
lists for lazy bitmaps. Probably there is more tuning potential in bitmaps
(most of the top 10 hot functions are bitmap related)

The patch actually saves memory too:

$ /usr/bin/time --format 'time %E maxrss %MK' ../obj-fast/gcc/cc1plus-bitmap
-std=gnu++20 -O2 pr119482.cc  -quiet -w
time 0:43.19 maxrss 854920K
$ /usr/bin/time --format 'time %E maxrss %MK'
../obj-fast/gcc/cc1plus-large-bitmap -std=gnu++20 -O2 pr119482.cc  -quiet -w
time 0:35.96 maxrss 788424K

-8% memory savings. I guess this means the access patterns are actually not
that
sparse. 

diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index 4a73ccdba794..a0a5098a25da 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -283,7 +283,7 @@ typedef unsigned long BITMAP_WORD;
 /* Number of words to use for each element in the linked list.  */

 #ifndef BITMAP_ELEMENT_WORDS
-#define BITMAP_ELEMENT_WORDS ((128 + BITMAP_WORD_BITS - 1) / BITMAP_WORD_BITS)
+#define BITMAP_ELEMENT_WORDS ((512 + BITMAP_WORD_BITS - 1) / BITMAP_WORD_BITS)
 #endif

 /* Number of bits in each actual element of a bitmap.  */

Reply via email to