[issue45417] Enum creation non-linear in the number of values

2021-10-15 Thread Ethan Furman
Change by Ethan Furman : -- assignee: -> ethan.furman stage: patch review -> backport needed versions: -Python 3.9 ___ Python tracker ___

[issue45417] Enum creation non-linear in the number of values

2021-10-14 Thread Ethan Furman
Ethan Furman added the comment: New changeset b2af211e229df941d9b404f69547a264115156b5 by Carl Friedrich Bolz-Tereick in branch 'main': bpo-45417: [Enum] fix quadratic behavior during creation (GH-28907) https://github.com/python/cpython/commit/b2af211e229df941d9b404f69547a264115156b5

[issue45417] Enum creation non-linear in the number of values

2021-10-12 Thread Carl Friedrich Bolz-Tereick
Carl Friedrich Bolz-Tereick added the comment: I fixed the reliance of set being insertion ordered in pypy and opened a pull request. -- ___ Python tracker ___

[issue45417] Enum creation non-linear in the number of values

2021-10-12 Thread Carl Friedrich Bolz-Tereick
Change by Carl Friedrich Bolz-Tereick : -- nosy: +Carl.Friedrich.Bolz nosy_count: 6.0 -> 7.0 pull_requests: +27198 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28907 ___ Python tracker

[issue45417] Enum creation non-linear in the number of values

2021-10-10 Thread Ken Jin
Change by Ken Jin : -- nosy: +barry, eli.bendersky, ethan.furman versions: +Python 3.9 -Python 3.7 ___ Python tracker ___ ___

[issue45417] Enum creation non-linear in the number of values

2021-10-10 Thread mattip
mattip added the comment: Over at PyPy arigo authored and we applied this fix to the as-yet unreleased pypy3.8. Note that it cannot be applied directly to CPython as sets are not ordered. Does the fix break anything? Tests in Lib/test/test_enum.py passed after applying it. --

[issue45417] Enum creation non-linear in the number of values

2021-10-10 Thread Armin Rigo
Armin Rigo added the comment: The timing is clearly quadratic: number of attributes time 1500 0.24s 3000 0.94s 6000 3.74s 1200015.57s Pressing Ctrl-C in the middle of the execution of the largest examples

[issue45417] Enum creation non-linear in the number of values

2021-10-08 Thread Oliver Margetts
New submission from Oliver Margetts : Creating large enums takes a significant amount of time. Moreover this appears to be nonlinear in the number of entries in the enum. Locally, importing a single python file and taking this to the extreme: 1000 entries - 0.058s 1 entries - 4.327s