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

Custom json implementation #4

Merged
merged 5 commits into from Jul 17, 2022
Merged

Custom json implementation #4

merged 5 commits into from Jul 17, 2022

Conversation

mikhail-barg
Copy link
Owner

This fixes issue with Json.net re-creation of JTokens on parent change. Also fixes #3. Also speeds up overall performance about x2 and lowers memory consumption twice (according to benchmark):

brefore:

Method Mean Error StdDev Gen 0 Gen 1 Allocated
ProcessNative 121.6 us 0.85 us 0.79 us 40.5273 - 124 KB
ProcessJs 36,203.3 us 523.68 us 489.85 us 7733.3333 466.6667 26,999 KB

after:

Method Mean Error StdDev Gen 0 Gen 1 Allocated
ProcessNative 66.02 us 1.070 us 0.948 us 19.6533 - 60 KB
ProcessJs 37,316.47 us 741.189 us 657.045 us 7928.5714 500.0000 27,015 KB

@mikhail-barg mikhail-barg merged commit 2e38025 into master Jul 17, 2022
@mikhail-barg mikhail-barg deleted the custom-json branch July 17, 2022 19:01
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.

Weird inconsistent results
1 participant