[PATCH 5/5] Add single-threaded path to _int_malloc

DJ Delorie dj@redhat.com
Mon Oct 23 18:50:00 GMT 2017


Looks good to me.

Wilco Dijkstra <Wilco.Dijkstra@arm.com> writes:
> However moving items from the fast bin to the tcache could be done in
> a much more efficient way in the future.

I tested a couple different algorithms for that, but there's lots of
opportunity to "tweak" the cache filling.

>> Remember, "fast at any cost" is not the goal.  "Fast while still
>> maintainable" is ;-)
>
> However those typically go together.

Sure, the interesting cases are when they don't ;-)

> We could use the ifunc mechanism to decide between different variants - 
> including for example for the single-thread optimization.

I suspect ifuncs are chosen before we know if the program will spawn any
threads, though.



More information about the Libc-alpha mailing list