osuAkatsuki / bancho.py

An osu! server for the generic public, optimized for maintainability in modern python
https://akatsuki.gg
MIT License
217 stars 131 forks source link

Replace usage of Enum classes with built-ins where possible #268

Closed cmyui closed 9 months ago

cmyui commented 2 years ago

These are generally slow - mostly referencing IntEnum and IntFlag operations which can be orders of magnitude slower than their built-in counterparts.

They have their use cases - but I overused them when creating bancho.py due to a lack of understanding.

tsunyoku commented 9 months ago

@cmyui might be nice to do this one as part of #623?

cmyui commented 9 months ago

I don't think this is worth doing honestly, there are so many higher priority items and not sure that this is purely gains/it will move complexity stdlib is handling into b.py.. Not worth a negligible performance gain