Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail From: Bonita Montero Newsgroups: comp.lang.c Subject: Re: Top 10 most common hard skills listed on resumes... Date: Tue, 27 Aug 2024 11:47:45 +0200 Organization: A noiseless patient Spider Lines: 48 Message-ID: References: <20240825192810.0000672c@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 27 Aug 2024 11:47:44 +0200 (CEST) Injection-Info: raubtier-asyl.eternal-september.org; posting-host="c6250afc797919d80f61f1a66bf36400"; logging-data="3096157"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FRBlUCtg6c1DlXefWnKJ9bWrNofeb0F0=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:lNTOUuGbFSSZ4XA0Ea/zbGihXN4= Content-Language: de-DE In-Reply-To: Bytes: 3360 Am 27.08.2024 um 11:32 schrieb David Brown: > On 27/08/2024 10:36, Bonita Montero wrote: >> C++ is efficient and abstract in one. > Any simple one-line claim here is clearly going to be wrong. 90% of the C++-abstractions are zero-cost abstractons. > C++ code can be efficient, or abstract, or both, or neither. Of course it can. Imagine functional programming with a std::sort. It's abstract since you won't have to deal with the details of the sort and supply only a comparison function object, but it's still optimally performant. >> You have to accept exceptions with C++ since there are a lot of places >> where C++ throws a bad_alloc or system_error. > Incorrect.  Like most low-level or systems programmers using C++, I have > exceptions disabled and never use them. You won't be able to change the runtime's behaviour with that. The runtime trows bad_alloc or system_error everywhere and if you disable exceptions the application simply terminates if this is thrown. > Incorrect. I just measured the tim of a ... virtual int fn( int, int ) .... which adds only two ints. The overhead is about one nanosecond on my Zen4-CPU. And usually you do complex tasks inside the virtual function so that the call itself doens't participate much in the overall computation time. > Virtual function overhead will sometimes be worth the cost, and in some > circumstances it can be less than more manual dispatch methods.  But it > is not cost-free, and the overhead can most certainly be relevant if it > is used inappropriately. If the destination of the dispatch varies the overhead is nearly the same as with static dispatch since most of the time takes the mispre- dicted branch.