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

COMMON: String performance improvements #5335

Merged
merged 2 commits into from Sep 20, 2023
Merged

Conversation

elasota
Copy link
Contributor

@elasota elasota commented Sep 18, 2023

Some performance improvements to avoid unnecessary string construction and copies:

  • Changes toLowercase and toUppercase to avoid calling makeUnique if the string doesn't require any modification.
  • Changes FSNode::getName to avoid calling punycode_decodefilename and the subsequent String -> U32String -> String conversions if the filename isn't punycode. This should significantly speed up AdvancedMetaEngineDetection::composeFileHashMap

@sev-
Copy link
Member

sev- commented Sep 20, 2023

Thanks! Clever approach with the toLowercase/toUppercase.

@sev- sev- merged commit 2f19102 into scummvm:master Sep 20, 2023
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants