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

Performance Improvements: next steps #1359

Open
tony-go opened this issue Nov 30, 2024 · 0 comments
Open

Performance Improvements: next steps #1359

tony-go opened this issue Nov 30, 2024 · 0 comments

Comments

@tony-go
Copy link
Contributor

tony-go commented Nov 30, 2024

This issue aims to gather the current status of the performance initiatives for JSONToolkit.

We would like to tracks observations, hypotheses and ideas.

Performance Investigation Document

Observation Hypotheses How to Reproduce Tracks and Ideas
Cache Performance: How many cache hits and cache misses do we get from CPU caches?
Branch Prediction Issues: Do we have branch prediction issues?
Cache Type: For the first hypothesis, is it data caches or instruction caches causing the bottleneck?
Methods related to std::variant show up in a number of profiles Come up with a simple tagged union vs. std::variant benchmark.Try replacing std::variant with a tagged union.
Validation of a document requires some memory allocation that is only used for the duration of validation We can reduce the memory management overhead for these allocations Try replacing malloc with an implementation that just uses a large block of statically allocated memory for everything. If this helps, use a bump allocator for everything allocated during validation.
Ordering of instructions can have a data-dependent impact on validation time We can't necessarily guess what order is best and it may change over time. Reordering instructions dynamically may improve performance. A schema with a large number of properties where only one of the properties fails validation in a sample dataset Start by measuring the performance gap in a worst-case example to see the potential benefit. Keep track of which instructions cause validation to fail and try to execute these instructions first.
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

No branches or pull requests

1 participant