Deutsch English Français Italiano |
<vanl7u$3hpoh$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thiago Adams <thiago.adams@gmail.com> Newsgroups: comp.lang.c Subject: Re: Top 10 most common hard skills listed on resumes... Date: Wed, 28 Aug 2024 14:02:54 -0300 Organization: A noiseless patient Spider Lines: 27 Message-ID: <vanl7u$3hpoh$1@dont-email.me> References: <vab101$3er$1@reader1.panix.com> <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> <20240825220016.00002793@yahoo.com> <86bk1e4y7t.fsf@linuxsc.com> <vajn50$2rqra$2@raubtier-asyl.eternal-september.org> <vajnha$2rtl3$1@dont-email.me> <vajns4$2rvg8$1@raubtier-asyl.eternal-september.org> <vajspc$2so1b$1@dont-email.me> <vajtdo$2ssc8$1@raubtier-asyl.eternal-september.org> <valodj$35rt8$7@dont-email.me> <vamarr$3btll$1@raubtier-asyl.eternal-september.org> <van0h7$3eqvr$1@dont-email.me> <van1sb$3f45o$1@raubtier-asyl.eternal-september.org> <van2ok$3f3q8$1@dont-email.me> <van6td$3frfe$1@raubtier-asyl.eternal-september.org> <van934$3g2ip$1@dont-email.me> <van9kt$3g7l8$1@raubtier-asyl.eternal-september.org> <vana36$3g9qu$1@dont-email.me> <vandpe$3gtv6$1@raubtier-asyl.eternal-september.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 28 Aug 2024 19:02:55 +0200 (CEST) Injection-Info: dont-email.me; posting-host="ff69eccb6a03ed8e39f9d9a339aa428c"; logging-data="3729169"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/h0n3MVbAvq+rRG7flGDd9ZE1TUMg/iB8=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:3HSKSp/XrMADTbV8KVoHqw0u9yw= In-Reply-To: <vandpe$3gtv6$1@raubtier-asyl.eternal-september.org> Content-Language: en-US Bytes: 2893 On 28/08/2024 11:55, Bonita Montero wrote: > Am 28.08.2024 um 15:52 schrieb Thiago Adams: > >> You have to deallocate only if the ownership still with the >> same object. This is not the case when the object is moved. > > Take this code > > string str; > > int main () > { > string str( "hello" ); > ::str = move( str ); > } > > With clang-cl (the MSVC-flavour of clang) the whole string-creation > and destruction is opmized away and the compiler directly checks if > ::str contains any externally allocated and if not it makes a short > -string-optimized "copy" to ::str. That's nine instructions for the > whole string copy with clang-cl 17.0.3; no external call. > > If you put everything on compiler bill, then you don't need move etc.. This create a language that is hard to trust.