jcrist / msgspec

A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
https://jcristharif.com/msgspec/
BSD 3-Clause "New" or "Revised" License
2.01k stars 59 forks source link

can msgspec provide a faster enum implementation? #674

Open aspizu opened 2 months ago

aspizu commented 2 months ago

Description

if msgspec.Struct is faster than dataclasses, can msgspec also provide enums?

There is fastenum which claims to be faster than regular python enum. but its not written in C.

aspizu commented 2 months ago

also i would like if the api didn't require the usage of auto()