Mailing List Archive

Re: GIL-Removal Project Takes Another Step (Posting On Python-List Prohibited)
On 20/03/24 4:14 pm, Lawrence D'Oliveiro wrote:
> 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.

That's not the way it usually works. If you run out of memory, you
run a GC there and then. You don't have to wait for GCs to occur on
a time schedule.

Also, as a previous poster pointed out, GCs are typically scheduled
by number of allocations, not by time.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Re: GIL-Removal Project Takes Another Step (Posting On Python-List Prohibited) [ In reply to ]
On Wed, 20 Mar 2024 at 18:31, Greg Ewing via Python-list
<python-list@python.org> wrote:
>
> On 20/03/24 4:14 pm, Lawrence D'Oliveiro wrote:
> > 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.
>
> That's not the way it usually works. If you run out of memory, you
> run a GC there and then. You don't have to wait for GCs to occur on
> a time schedule.
>
> Also, as a previous poster pointed out, GCs are typically scheduled
> by number of allocations, not by time.
>

FYI you're violating someone's request by responding to them in a way
that results in it getting onto python-list, so it's probably safest
to just ignore cranks and trolls and let them stew in their own
juices.

But normally the GC doesn't need to be scheduled at all. In CPython,
the only reason to "run garbage collection" is to detect cycles, so
you would have to be generating inordinate amounts of cyclic garbage
for this to matter at all.

ChrisA
--
https://mail.python.org/mailman/listinfo/python-list