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

Improved Note-On performance #1232

Merged
merged 1 commit into from
Feb 4, 2024
Merged

Conversation

KKQ-KKQ
Copy link
Contributor

@KKQ-KKQ KKQ-KKQ commented Feb 1, 2024

I found that calculating a hash of the ModKey is the bottleneck.
I added a variable to cache ModKey's hash.

@KKQ-KKQ
Copy link
Contributor Author

KKQ-KKQ commented Feb 1, 2024

I found ModKey hash function doesn't process its region.
I added the process.

@paulfd
Copy link
Member

paulfd commented Feb 2, 2024

Thanks a lot for the PR and for catching this! I will take some time to review it better hopefully this WE. I had another issue a long time ago where I also needed to cache the key/id hashes for lookups in the modulation matrix...

@paulfd
Copy link
Member

paulfd commented Feb 3, 2024

Would it be okay that I reformat and squash the commits a bit to match the usual code style? I'll keep your authorship.

@KKQ-KKQ
Copy link
Contributor Author

KKQ-KKQ commented Feb 3, 2024

No problem.
I am very new to co-working and I’m still getting used to using git.

@paulfd paulfd force-pushed the modkey-performance branch from 984588b to debc013 Compare February 3, 2024 17:42
- Compute the hash value on ModKey construction and memorize it
- Fix missing region ID in the hash value of ModKey
@paulfd paulfd force-pushed the modkey-performance branch from debc013 to d96676b Compare February 3, 2024 19:23
@paulfd
Copy link
Member

paulfd commented Feb 4, 2024

No worries, thanks a lot! I mostly put all commits into a single one (which is called "squashing") to make it easier to follow the history.

@paulfd paulfd merged commit f8fc628 into sfztools:develop Feb 4, 2024
11 checks passed
@KKQ-KKQ KKQ-KKQ deleted the modkey-performance branch February 15, 2024 09:04
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