From: René Scharfe Date: Wed, 21 Dec 2016 09:36:25 GMT Subject: Re: [PATCH 1/3] compat: add qsort_s() Message-ID: <2203c696-3a86-626b-c516-285daef15022@web.de> In-Reply-To: <20161212195703.nmljhwwmrn56gbyd@sigill.intra.peff.net> Am 12.12.2016 um 20:57 schrieb Jeff King: > On Mon, Dec 12, 2016 at 08:51:14PM +0100, René Scharfe wrote: > >> It's kinda cool to have a bespoke compatibility layer for major platforms, >> but the more I think about it the less I can answer why we would want that. >> Safety, reliability and performance can't be good reasons -- if our fallback >> function lacks in these regards then we have to improve it in any case. > > There may be cases that we don't want to support because of portability > issues. E.g., if your libc has an assembly-optimized qsort() we wouldn't > want to replicate that. Offloading to GPUs might be a better example; I don't know of a libc that does any of that, though (yet). > I dunno. I am not that opposed to just saying "forget libc qsort, we > always use our internal one which is consistent, performant, and safe". > But when I suggested something similar for our regex library, I seem to > recall there were complaints. Well, I'm not sure how comparable they are, but perhaps we can avoid compat code altogether in this case. Patch coming in a new thread. René