This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: contribution to glibc





From: Rene Rebe <rene@exactcode.de>
To: "djamel anonymous" <djam8193ah@hotmail.com>
CC: libc-alpha@sources.redhat.com
Subject: Re: contribution to glibc
Date: Fri, 16 Jun 2006 19:30:45 +0200

Hi,

in addition to my previous comments:

On Friday 16 June 2006 10:54, Rene Rebe wrote:

> most people prefer to look on unified diffs (diff -u) these days. Maybe
> resend it to get more comments and probably also change a subject
> reflecting the content of the contribution e.g. [PATCH] qsort optimization


This change could never have compiled:

<       if (size / pagesize > (size_t) phys_pages)
---
>       if (size / pagesize) > (size_t) phys_pages)

Without reading any further I wonder if you actually tested and benchmarked
the changed you did.
i apologize for thiis error , in fact i didn't test the function qsort but only the function msort_with_tmp which is the function that does the actual sort.i haven't tested directly the function qsort because the modifications to it were trivial and they didn't have any impact on the correctness or the performance of sorting.in fact the only modification that was in my intented to the function qsort was to allocate half the size it was previously allocating. and to modify the condition under which it uses quicksort instead of mergesort.this condition was previously that
the allocated size have to not exceed quarter the size of physical memory. i changed the condition to 1 third to maintaint the invariant: original array+allocated array<=physical memory.
best regards.


_________________________________________________________________
MSN Hotmail : créez votre adresse e-mail gratuite & à vie ! http://www.msn.fr/newhotmail/Default.asp?Ath=f



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]