Deutsch English Français Italiano |
<utdkb8$19g6t$4@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.python Subject: Re: GIL-Removal Project Takes Another Step (Posting On Python-List Prohibited) Date: Wed, 20 Mar 2024 03:14:49 -0000 (UTC) Organization: A noiseless patient Spider Lines: 19 Message-ID: <utdkb8$19g6t$4@dont-email.me> References: <ut09ig$1umjo$1@dont-email.me> <87v85jxepj.fsf@nightsong.com> <utati7$k004$1@dont-email.me> <87r0g5ybbp.fsf@nightsong.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 20 Mar 2024 03:14:49 -0000 (UTC) Injection-Info: dont-email.me; posting-host="a3c7bb3811b3cbef9d335e33aa837a41"; logging-data="1360093"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+O2LrRpnV5tD/9Ln4fchCK" User-Agent: Pan/0.155 (Kherson; fc5a80b8) Cancel-Lock: sha1:Ja6S9y5yeXgT20wqG9QRJmENSdA= Bytes: 1967 On Tue, 19 Mar 2024 17:51:54 -0700, Paul Rubin wrote: > Lawrence D'Oliveiro <ldo@nz.invalid> writes: > >> So even a very simple, seemingly well-behaved Python script, if running >> for long enough, would consume more and more memory if it were not for >> reference-counting. > > That is completely false. It's usual to set a GC to [fix it so it’s not > false] ... In other words, it’s not “completely” false if you have to do something to make it false. But that GC process creates its own overhead, not to mention the latency when there isn’t quite enough memory for an allocation and you have to wait until the next GC run to proceed. Run the GC a thousand times a second, and the latency is still 1 millisecond. With reference counting, most objects are immediately freed as soon as they are discarded--no need to wait for the next GC run.