πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1571

Re: Inversion-of-control and dependency-injection in C

#1571
From: fir
Date: Mon, 16 Nov 2026 15:38
39 lines
3131 bytes
fir pisze:
> fir pisze:
>> Bonita Montero pisze:
>>> Am 12.11.2026 um 21:15 schrieb Chris M. Thomasson:
>>>
>>>> C is C. Imvvvvho, C++ is better... :^) Let the flames begin.
>>>
>>> A frequently cited point in this context is that `std::sort()` is
>>> typically many times faster than `qsort()`, thanks to the inlining
>>> of the function object. Furthermore, a function object can easily
>>> incorporate an external context by capturing it within a lambdaβ€”
>>> something that is simply not possible with `qsort()`, where a C
>>> -style comparison function is restricted to accessing only global
>>> variables. This falls far short of the capabilities offered by
>>> functional programming. In other words: C is incapable of func-
>>> tional programming.
>>
>> you can write you own sort or paste if trom the net and its not worse 
>> than c++
>>
>> in some thread on this as maybe you remember i taka a contest ;c on c++
>> sort and beat it much (as far as i remember by code taken from net)
>>
> my own quote from google groups
> 
> "
> fir
> 23 kwi 2022, 12:35:57
> do
> try radix sort, i once measured that things (on 10-yo old machine) and 
> testing sorting 1MB of integers and remember c quicksort (like that from 
> wikipedia) have 150 ms , c++ std:sort 111 ms,
> c insertsort 111 ms also or 2 ms worse something like that, c-radix sort 
> (taken from stack overflow) 17 ms beating c++:stdsort more than 3 times
> for more details search "quicksort" in this group (the search in google 
> groups work).."

see here 
https://groups.google.com/g/comp.lang.c/c/I4lJSh45EJ0/m/ezGwgnvWDgAJ
Technical Details
Message-ID: <11df81h$3lvo1$2@dont-email.me>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <yQOdnQ-qnKiiZ2j3nZ2dnZfqn_udnZ2d@giganews.com> <11d54jb$80v7$1@raubtier-asyl.eternal-september.org> <11d56pj$8sfe$1@dont-email.me> <11df75b$3lnf4$1@raubtier-asyl.eternal-september.org> <11df7h3$3lpoh$1@dont-email.me> <11df7su$3lvo1$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: fir <profesor.fir@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Inversion-of-control and dependency-injection in C
Date: Mon, 16 Nov 2026 16:38:25 +0100
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <11df81h$3lvo1$2@dont-email.me>
References: <yQOdnQ-qnKiiZ2j3nZ2dnZfqn_udnZ2d@giganews.com>
 <11d54jb$80v7$1@raubtier-asyl.eternal-september.org>
 <11d56pj$8sfe$1@dont-email.me>
 <11df75b$3lnf4$1@raubtier-asyl.eternal-september.org>
 <11df7h3$3lpoh$1@dont-email.me> <11df7su$3lvo1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 16 Nov 2026 15:38:26 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3866369"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19zIIc78crvry+q83RYy1P33wSFgmLLacg="; posting-host="ffaeb1a4357f66637402e7443ff79a2b"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101
 Firefox/140.0 SeaMonkey/2.53.24
Cancel-Lock: sha1:SnvJCaWEtFmEf02yTexaSAV3rns= sha256:Y8rRKuEV5QRslmaGOljA0Lmcrw6l869al7wIrgGwfTg=
	sha1:Mff4olWOIh3e5WUbQwD/ml/0UMs= sha256:JWxr8VF9zU1tUZzsS5fmy6EEgg7PGvXOMWPvFZI5Yog=
In-Reply-To: <11df7su$3lvo1$1@dont-email.me>