Armin Rigo <ar...@users.sourceforge.net> added the comment:

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

----------
nosy: +arigo

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38659>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to