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 optimization #135

Merged
merged 64 commits into from
Apr 22, 2024
Merged

Cache optimization #135

merged 64 commits into from
Apr 22, 2024

Conversation

erincatto
Copy link
Owner

@erincatto erincatto commented Mar 9, 2024

Refactored internal storage to use solver sets for improved memory locality and improved performance as a result.

There is now a hot/cold split for bodies, contacts, and joints.

This is a huge change as the layout of memory has changed completely. Some things, such as enable/disable bodies and changing the body type are quite complex now. So this required a lot of testing and validation code.

Bodies, contacts, and joints data is now moved when an island goes to sleep or wakes up.

Static bodies exist in their own solver set, but this is hidden from the user. All solver set details are hidden from the user and they provide no user facing features other than improved performance.

I also added a benchmark application with several benchmarks. These generate CSV files with results.

400 pyramids, 22000 bodies
time in milliseconds (8 cores on 7950x)

solver set branch
step 2.3
-- collide 1.15
-- solve 1.15

main branch
step 3.3
-- collide 1.45
-- solve 1.7

@erincatto erincatto merged commit 41e47c6 into main Apr 22, 2024
4 checks passed
@erincatto erincatto deleted the erincatto/perf_tracking branch April 22, 2024 06:38
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