Deutsch English Français Italiano |
<vak7c0$2ufit$1@raubtier-asyl.eternal-september.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail From: Bonita Montero <Bonita.Montero@gmail.com> 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: <vak7c0$2ufit$1@raubtier-asyl.eternal-september.org> References: <vab101$3er$1@reader1.panix.com> <vad7ns$1g27b$1@raubtier-asyl.eternal-september.org> <vad8lr$1fv5u$1@dont-email.me> <vaf7f0$k51$2@reader1.panix.com> <vafgb2$1to4v$2@dont-email.me> <vafkdk$1ut4h$2@raubtier-asyl.eternal-september.org> <20240825192810.0000672c@yahoo.com> <vafs6u$21ofd$1@raubtier-asyl.eternal-september.org> <vafsst$20j4p$3@dont-email.me> <vaj3c4$2lb2c$1@dont-email.me> <vaj46o$2kusd$2@dont-email.me> <vajvoh$2t849$1@dont-email.me> <vak35f$2tphj$1@raubtier-asyl.eternal-september.org> <vak6f8$2tsqj$2@dont-email.me> 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: <vak6f8$2tsqj$2@dont-email.me> 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.