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

Improve spine runtime #9

Merged
merged 6 commits into from
Oct 18, 2024
Merged

Conversation

genment
Copy link
Contributor

@genment genment commented Oct 17, 2024

This PR mainly updates the JSON parser, making it about 2x faster than the old version. I decided not to use System.Text.Json (STJ) because, while it’s a bit faster, the improvement isn’t significant enough to justify the big changes we'd need to make in the deserialization logic.

Benchmark:

Method Mean Error StdDev Ratio Allocated
Old_2_1_25 10.369 ms 0.1986 ms 0.5634 ms 1.00 10.94 MB
Original_4_2 7.542 ms 0.1502 ms 0.1730 ms 0.73 6.01 MB
My_Updated_4_2 4.494 ms 0.0186 ms 0.0155 ms 0.43 4.61 MB
STJ 3.972 ms 0.0232 ms 0.0217 ms 0.39 1.63 MB

@lastbattle
Copy link
Owner

I'd typically not make any changes to the default spine-runtime library but its all great here.
Merged, thanks as always! 👍🏻

@lastbattle lastbattle merged commit db9d86d into lastbattle:main Oct 18, 2024
1 check passed
@genment genment deleted the improve-spine-runtime branch October 18, 2024 05:26
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.

2 participants