Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

fortune: cannot execute. Out of cookies.


devel / comp.lang.python / Re: Could frozendict or frozenmap be of some use for PEP 683 (Immortal objects)?

SubjectAuthor
o Re: Could frozendict or frozenmap be of some use for PEP 683Marco Sulla

1
Re: Could frozendict or frozenmap be of some use for PEP 683 (Immortal objects)?

<mailman.256.1646917147.2329.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17450&group=comp.lang.python#17450

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: Marco.Su...@gmail.com (Marco Sulla)
Newsgroups: comp.lang.python
Subject: Re: Could frozendict or frozenmap be of some use for PEP 683
(Immortal objects)?
Date: Thu, 10 Mar 2022 13:58:27 +0100
Lines: 10
Message-ID: <mailman.256.1646917147.2329.python-list@python.org>
References: <CABbU2U-aUuv4beQZ55aacmTmh7JqsMwcJk8PA+2Bu9GbT9RUFw@mail.gmail.com>
<20220309222710.qzg25vclyeqmgcsd@gmail.com>
<CABbU2U_bjggczS=3W=Vdb=1Jkoa7Et8gE32+t3RnJLSdRh-ddQ@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de aD9WLZO4nwOBWrCjzg9ulADlVCnPBanhsMPxJJ0XQdmw==
Return-Path: <elbarbun@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=bsp57aOn;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.072
X-Spam-Evidence: '*H*': 0.86; '*S*': 0.00; '2022': 0.05; 'mar': 0.07;
'memory.': 0.09; 'memory': 0.15; 'cpython.': 0.16;
'from:name:marco sulla': 0.16; 'heavy': 0.16; 'removed.': 0.16;
'wrote:': 0.16; 'problem': 0.16; 'to:addr:python-list': 0.20;
'program': 0.31; 'think': 0.32; 'message-id:@mail.gmail.com':
0.32; 'but': 0.32; 'subject:for': 0.33; 'fill': 0.34; 'header:In-
Reply-To:1': 0.34; 'received:google.com': 0.34; 'understood':
0.35; 'from:addr:gmail.com': 0.35; 'those': 0.36; 'really': 0.37;
'received:209.85': 0.37; 'received:209': 0.39; 'subject:PEP':
0.39; 'wed,': 0.39; 'happen': 0.40; 'martin': 0.40; 'imagine':
0.64; 'subject:some': 0.69; 'little': 0.73; 'thousands': 0.78;
'quickly': 0.80; 'paola': 0.84; 'strings': 0.84; 'subject:Could':
0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=posoQ9cl+TcRMDYeQJTroscQ0KoeGQ1KtWnOQXXixLA=;
b=bsp57aOnh4XJF1JSpEFBQDLPGGmohsyiZCmo5yj8LD2Wvb3wdGnSLFVR0BlvPvRvvA
TTTGm5BXEBCjNTqM10YyoMVPJcgZfYQvmjEwfbMoJC2iiJ5QJNCIqgUUgwq4JoxkoMGL
876wV2uAhqY9rz75p2J54bXSvmxvYneOWqMZSf3Udp5+7z+VbLhJx3DLtFF7/lsnIXtU
gvKrh3CclLrKKh7EGI9h/Tm1iFKrW+x19/YhJqgot8/NrKk+M7HYAYfYXGlaPOdqTMLQ
Bup7l8lYoCgiuTaMCX7+eu37Mb8SyQD0DG9LAAKEz4enFKGa6IBBZIMB3N5mOlHl4ti2
DZ8Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=posoQ9cl+TcRMDYeQJTroscQ0KoeGQ1KtWnOQXXixLA=;
b=huYVH5CxMyYBYhSheeOkogCvghAZqi+PsPKWdF+S2VfvDYmbInhzV9yxgV+oJEx1mO
yq41M11noUxmtpWPbKChTkX6jUmDPXKYgGUUUaJT3GK7b1ZzwtMBOe6VElSv/Cht0liD
OfI7G4qAAr9l2lbBhca/sFWVHIs1BsrH28qelVDNNnNLzb9AFOxlpbyn6CNj+Qj8L65k
2uZfrVG6VRkChj09odlRcjSQVOcBw8V93b+uN8iEuRPdr39BodopFIt0pnQAeeKm3qeK
sdrnDs9HI0izseCbjo+TscHP1UI+dwEOQQ71uu9xHJ3j/D+Voif4SzDbw3PlwDpL2p0v
Bc4A==
X-Gm-Message-State: AOAM531MHFb8/0PqSVVlz+WmkwcjRqibGnT4sEaBCb3qqhsTxu87rBGh
sa10mZz47XPzPxzD+Ys2iKIfADbNFPC0WvX8CM/dJ/WQ
X-Google-Smtp-Source: ABdhPJyW1NtGkAw5tmiQpV/pzItZw7XfsO8+7BAZfifCFXrDkQDNkPrAy9o9mHbtm4FxwKUQhctd1U5iBy0Ai4lRHTg=
X-Received: by 2002:a81:6307:0:b0:2d6:6aee:dc75 with SMTP id
x7-20020a816307000000b002d66aeedc75mr3833309ywb.249.1646917144027; Thu, 10
Mar 2022 04:59:04 -0800 (PST)
In-Reply-To: <20220309222710.qzg25vclyeqmgcsd@gmail.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CABbU2U_bjggczS=3W=Vdb=1Jkoa7Et8gE32+t3RnJLSdRh-ddQ@mail.gmail.com>
X-Mailman-Original-References: <CABbU2U-aUuv4beQZ55aacmTmh7JqsMwcJk8PA+2Bu9GbT9RUFw@mail.gmail.com>
<20220309222710.qzg25vclyeqmgcsd@gmail.com>
 by: Marco Sulla - Thu, 10 Mar 2022 12:58 UTC

On Wed, 9 Mar 2022 at 23:28, Martin Di Paola <martinp.dipaola@gmail.com> wrote:
> Think in the immutable strings (str). What would happen with a program
> that does heavy parsing? I imagine that it will generate thousands of
> little strings. If those are immortal, the program will fill its memory
> very quickly as the GC will not reclaim their memory.

Well, as far as I know immortality was also suggested for interned
strings. If I understood well, the problem with "normal" strings is
that they are not really immutable in CPython. They have cache etc.
Also frozendict caches hash, but that cache can be easily removed.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor