Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache code templates to speed up serde codegen #528

Merged
merged 1 commit into from
Jun 2, 2024

Conversation

yukinarit
Copy link
Owner

Usage
$ python profile_codegen.py

Before
13140368 function calls (12815954 primitive calls) in 5.964 seconds

After
6391286 function calls (6082792 primitive calls) in 3.396 seconds

#524

Copy link

Please consider formatting your code according to the standards described here: https://github.com/yukinarit/pyserde/blob/main/CONTRIBUTING.md

Copy link

Please consider formatting your code according to the standards described here: https://github.com/yukinarit/pyserde/blob/main/CONTRIBUTING.md

Before
4572556 function calls (4301342 primitive calls) in 1.405 seconds

After
1080875 function calls (1052233 primitive calls) in 0.383 seconds
@yukinarit yukinarit marked this pull request as ready for review June 1, 2024 13:09
@yukinarit yukinarit changed the title Cache typing related functions to speed up @serde codegen Cache code templates to speed up serde codegen Jun 1, 2024
@yukinarit yukinarit merged commit f02d446 into main Jun 2, 2024
6 checks passed
@yukinarit yukinarit deleted the performance-improvement branch June 2, 2024 13:39
github-actions bot pushed a commit that referenced this pull request Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant