-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More efficient module state access in top-level functions
Top-level functions defined using the c-api have the module object passed as `self`, there's no need to go through `PyState_FindModule` for these functions. This shaves ~5 ns off the call time per function, which is ~6% of the overhead of a `msgspec.json.encode` call.
- Loading branch information
Showing
1 changed file
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters