msgspec
msgspec copied to clipboard
Investigate inlining functions from `annotationlib`
Description
Context from https://github.com/jcrist/msgspec/issues/880#issuecomment-3420015782 & https://github.com/jcrist/msgspec/pull/852#discussion_r2107616118 explains that we use 2 functions:
get_annotations- this contains a lot of tricky logic which may be difficult to maintain ourselvesget_annotate_from_class_namespace- this (currently) contains simple dictionary lookups which would be unlikely to cause a maintenance burden
The task here is only to assess how each of these functions impacts our performance and startup overhead.