Article View: comp.lang.c
Article #1861Re: C and its pesent 'ancestos'
From: Bonita Montero
Date: Thu, 26 Nov 2026 10:50
Date: Thu, 26 Nov 2026 10:50
22 lines
2343 bytes
2343 bytes
Am 26.11.2026 um 11:21 schrieb fir: > tabbit tab[20]; > > if rabbit is a structure (if we talk on just c w ith resizable arrays, or > hipermodule if we move on more elaborate c extansions) vector<rabbit> tab; tab.emplace_back( ... ); This deals with the whole reallocations for you. Due to the guarantee of the amortized constant overhead with a capacity growth the array grows exponentially for the sake of performance. > you cal reallock internally (in c runtime) if you wnat to resize > tab.length+=80; > tab.length=tab.length+ 80; > tab.length*=3; //and so on Too much unnecessary work.
Technical Details
Message-ID:
<11e92tp$jh74$1@raubtier-asyl.eternal-september.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mailReferences:
<11dup6q$v4j9$1@dont-email.me> <11e0kde$1jpvu$1@dont-email.me> <11e0r13$1lqm6$1@dont-email.me> <11e0uc0$1mtpv$1@raubtier-asyl.eternal-september.org> <11e7fj4$37l9$1@dont-email.me> <11e8oro$ft4l$1@raubtier-asyl.eternal-september.org> <11e8stp$hajr$1@dont-email.me> <11e8ti0$hhqa$1@dont-email.me> <11e8v24$i2mc$2@raubtier-asyl.eternal-september.org> <11e9045$ihk3$1@dont-email.me> <11e90j7$io87$1@raubtier-asyl.eternal-september.org> <11e9171$ivdo$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!eternal-september.org!feeder.eternal-september.org!nntp.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: C and its pesent 'ancestos' Date: Thu, 26 Nov 2026 11:50:34 +0100 Organization: A noiseless patient Spider Lines: 22 Message-ID: <11e92tp$jh74$1@raubtier-asyl.eternal-september.org> References: <11dup6q$v4j9$1@dont-email.me> <11e0kde$1jpvu$1@dont-email.me> <11e0r13$1lqm6$1@dont-email.me> <11e0uc0$1mtpv$1@raubtier-asyl.eternal-september.org> <11e7fj4$37l9$1@dont-email.me> <11e8oro$ft4l$1@raubtier-asyl.eternal-september.org> <11e8stp$hajr$1@dont-email.me> <11e8ti0$hhqa$1@dont-email.me> <11e8v24$i2mc$2@raubtier-asyl.eternal-september.org> <11e9045$ihk3$1@dont-email.me> <11e90j7$io87$1@raubtier-asyl.eternal-september.org> <11e9171$ivdo$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 26 Nov 2026 10:50:34 +0000 (UTC) Injection-Info: raubtier-asyl.eternal-september.org; logging-data="640228"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/B67n3lJnAitOCiDrYyYk5x4yKo36/fPE="; posting-host="b5d0c6a64d4561e46edbb7a5c64af4ef" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:j0W2OCapM0WDyZNxXsb1slXsky0= sha256:vLo4QRl523WEUacNm2X1ukCCSTQomo5MkhyaGbppeSw= sha1:i4wCj8y6C05XgAen4sTUrB3lB+M= sha256:Q0J+O9kasc8GxivTNLdgS+k3geTdcistpaHch5UEHdE= Content-Language: de-DE In-Reply-To: <11e9171$ivdo$1@dont-email.me>