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

ak at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ak at gcc dot gnu.org

--- Comment #13 from ak at gcc dot gnu.org ---

>so my idea was to have multiple freelists so that p->bytes == entry_size
>and this list walk, which is the bottleneck for PR119387 I think, is
>improved.

It should be improved because the first element will near always match.

I only kept the comparison for the fallback case: if there is no free list for
a given size so it puts the size into freelist[0]. But I'm not sure  this can
actually happen (for simple tests it never  triggers). If the fallback is
removed the comparison could be removed too, but it probably doesn't matter for
performance.

>Using your patch this changes to

>Samples: 1M of event 'cycles:Pu', Event count (approx.): 1053172130606
>   0.02%           234  cc1plus  cc1plus  [.] alloc_page(unsigned int)

>so the patch works as intended!

Great. I will submit it for phase 1 if I don't forget.

Reply via email to