Article View: comp.lang.c
Article #1570Re: Inversion-of-control and dependency-injection in C
From: fir
Date: Mon, 16 Nov 2026 15:35
Date: Mon, 16 Nov 2026 15:35
35 lines
2958 bytes
2958 bytes
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).."
Technical Details
Message-ID:
<11df7su$3lvo1$1@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-mailReferences:
<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>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:35:58 +0100 Organization: A noiseless patient Spider Lines: 35 Message-ID: <11df7su$3lvo1$1@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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 16 Nov 2026 15:35:59 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3866369"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AEXHDApYD+JuXnmq0yoQBPGI4OOBQIms="; 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:QboroVoO6z9OxD2bUJAwGZjsW8s= sha256:ohZpXmyThih7ooNzh9J/UUmLoFZlTw1NbXmOjQpftY0= sha1:+jsfdiNzgxBHcrYxf8TcYl0da+M= sha256:G8FK60gc3qScS7wSHN0A68CiYB9RtI2f0nCcV73fe9o= In-Reply-To: <11df7h3$3lpoh$1@dont-email.me>