Request for feedback on WG14 proposal N3849 (alloc_at_least)
Florian Weimer
fweimer@redhat.com
Thu Apr 23 17:05:29 GMT 2026
* Wilco Dijkstra:
> Hi Paul,
>
>> Although the proposal's main motivation is runtime efficiency, it
>> doesn't say what sort of efficiency improvements are likely in practice,
>> so I can see an argument that it's not worth the complexity.
>>
>> Presumably the proposal entails efficiency costs and benefits; it'd be
>> nice to see measurements of both.
>
> I didn't find a clear motivation about performance in the proposal.
> However realloc is *fast* if the size fits or is a little smaller: it takes
> less than 5 cycles on a modern CPU (over 550 million calls per second).
If you don't know the allocator internals, you can't tell which realloc
arguments are actually fast (or which arguments to malloc produce zero
unused slack).
Thanks,
Florian
More information about the Libc-alpha
mailing list