[PATCH v5 1/6] stdlib: Optimization qsort{_r} swap implementation

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Jul 17 19:06:09 GMT 2023



On 17/07/23 15:58, Paul Eggert wrote:
> On 2023-07-17 11:07, Adhemerval Zanella Netto wrote:
>> I am not sure in fact, my take was the code as simple enough to have this
>> concern.
> 
> The usual rule of thumb is that ten lines are trivial, and that more than that might be a concern. When it's a concern, you can't simply read the original code and rewrite it in a different way; you need to actually rewrite it from scratch, preferably without looking at the original code. It's a pain, admittedly.

Alright, I don't think it should much of trouble to reimplement a simple heapsort.


More information about the Libc-alpha mailing list