[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65491: [PATCH] Improve performance allocating vectors
From: |
Stefan Monnier |
Subject: |
bug#65491: [PATCH] Improve performance allocating vectors |
Date: |
Mon, 28 Aug 2023 08:47:45 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> @@ -3426,6 +3428,7 @@ sweep_vectors (void)
>> gcstat.total_vectors = 0;
>> gcstat.total_vector_slots = gcstat.total_free_vector_slots = 0;
>> memset (vector_free_lists, 0, sizeof (vector_free_lists));
>> + last_known_vector_free_idx = VECTOR_MAX_FREE_LIST_INDEX;
>>
>> /* Looking through vector blocks. */
>
> Hmm... so I was wrong and after GC there are aren't any free vectors?
> I need to go re-read that code, then, because it doesn't match my mental
> model of how it work(s|ed).
Ah, no, I see what's going on: the above code is run at the *beginning*
of `sweep_vectors` before we discover which (free) vectors remain.
Stefan
- bug#65491: [PATCH] Improve performance allocating vectors, (continued)