Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c Subject: Re: Open letter to Ian Collins Date: Sun, 27 May 2012 21:22:00 +1200 Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net hqamDvpoltHxxeOxxgUq7wUoTwVBV6hSE268Df0GLTMlkXxpVyy8vK/OMDHTA02Bwe Cancel-Lock: sha1:gBrL6ajxXmn2kMIx52Cu7gJvMw0= User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:12.0) Gecko/20120423 Thunderbird/12.0 In-Reply-To: Xref: csiph.com comp.lang.c:21401 On 05/27/12 09:12 PM, jacob navia wrote: > Le 27/05/12 10:56, Ian Collins a écrit : >> As I expected, the big difference was in sorting: >> >> ccl version: >> >> To sort 85.6384S >> >> C++ version (std::list.sort()): >> >> To sort 18.7927S > > Yes. But I am not finished yet. I am writing a generic > qsort module that will avoid the function call overhead of > the current solution. > > As it is now, qsort calls a user defined sort function, that makes a > memcmp of the data... > > With the generic qsort function you would directly compare > the data (without function calls) by specifying a macro > for comparing your data. For integers it would be simply > > a - b That will be interesting to see. -- Ian Collins