[issue33205] GROWTH_RATE prevents dict shrinking

2022-01-26 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33205] GROWTH_RATE prevents dict shrinking

2022-01-26 Thread Inada Naoki
Inada Naoki added the comment: We do not have *fill* since Python 3.6. There is a `dk_nentries` instead. But when `insertion_resize()` is called, `dk_nentries` is equal to `USABLE_FRACTION(dk_size)` (dk_size is `1 << dk_log2_size` for now). So it is different from *fill* in the old dict. I

[issue33205] GROWTH_RATE prevents dict shrinking

2022-01-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33205] GROWTH_RATE prevents dict shrinking

2022-01-25 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33205] GROWTH_RATE prevents dict shrinking

2022-01-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Should this have been "filled*3" rather than "used*3"? The intent was to give a larger resize to dict that had a lot of dummy entries and a smaller resize to dicts without deletions. -- ___ Python tracker

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-17 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed ___ Python tracker ___ ___

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-17 Thread INADA Naoki
Change by INADA Naoki : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-17 Thread miss-islington
miss-islington added the comment: New changeset 902bb62d5af21526b68892a1032c63aa86ded247 by Miss Islington (bot) in branch '3.7': bpo-33205: dict: Change GROWTH_RATE to `used*3` (GH-6350)

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +6198 ___ Python tracker ___

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-17 Thread INADA Naoki
INADA Naoki added the comment: New changeset 5fbc511f56688654a05b9eba23d140318bb9b2d5 by INADA Naoki in branch 'master': bpo-33205: dict: Change GROWTH_RATE to `used*3` (GH-6350) https://github.com/python/cpython/commit/5fbc511f56688654a05b9eba23d140318bb9b2d5

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The capacity of the dict is 2/3 of its hashtable size: dk_usable < 2/3 * dk_size. Currently the dict grows if dk_usable > 1/4 * dk_size, and preserves the size if dk_usable < 1/4 * dk_size. Note that it it can grow twice if

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-05 Thread INADA Naoki
INADA Naoki added the comment: @Mark.Shannon, @rhettinger How do you think this? -- ___ Python tracker ___

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-02 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +6060 stage: -> patch review ___ Python tracker ___

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-02 Thread INADA Naoki
INADA Naoki added the comment: # cap2.json is master (used*2 + dk_size/2) # used3.json is patched (used*3) $ ./python-master -m perf compare_to cap2.json used3.json -G Slower (2): - rand_access(size=20): 2.67 ms +- 0.01 ms -> 2.80 ms +- 0.04 ms: 1.05x slower (+5%) -

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-02 Thread INADA Naoki
New submission from INADA Naoki : GROWTH_RATE is changed from (used*2) to (used*2 + dk_size/2) in #17563, at Python 3.4. It was for avoid resizing dict for massive del/insert use case, by increasing possibility of overwriting DUMMY entry. >From Python 3.6, there are no