This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arigo
Recipients ammar2, arigo, ethan.furman, gregory.p.smith, pablogsal, vstinner
Date 2021-10-09.05:52:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1633758763.08.0.377989614976.issue38659@roundup.psfhosted.org>
In-reply-to
Content
Nobody seemed to mention it so I might as well: defining a regular Enum class takes an amount of time that is clearly quadratic in the number of attributes.  That means that the problem is not Python-versus-C or small speed-ups or adding secret APIs to do the simple case faster.  The problem is in the algorithm which needs to be fixed somewhere.  My timings:

number of attributes     time
1500                     0.24s
3000                     0.94s
6000                     3.74s
12000                    15.57s
History
Date User Action Args
2021-10-09 05:52:43arigosetrecipients: + arigo, gregory.p.smith, vstinner, ethan.furman, ammar2, pablogsal
2021-10-09 05:52:43arigosetmessageid: <1633758763.08.0.377989614976.issue38659@roundup.psfhosted.org>
2021-10-09 05:52:43arigolinkissue38659 messages
2021-10-09 05:52:42arigocreate