Repository navigation
Some micro-optimizations centered around tagName/nodeName - #3839
Merged
Merged
Conversation
domenic
force-pushed
the
reflecturl-cache
branch
from
March 15, 2025 10:41
b457fcc to
285e3ab
Compare
domenic
force-pushed
the
faster-string-ops
branch
from
March 15, 2025 10:44
93bc80e to
c968af5
Compare
* Implement a faster version of toASCIIUppercase, which is used by tagName. (Also do the same for toASCIILowercase while we're there.)
* Access _namespaceURI directly, since the getter showed up as 0.2% of the profile, and although I'm skeptical of that being real, it doesn't hurt.
* Most importantly, stop accessing nodeName when possible:
* In the non-error cases of _preInsertValidity(), we can just avoid it. This shows up for all appends.
* In the isNamedPropertyElement() check, we can just use localName. This also shows up for all appends.
* In other cases scattered throughout the codebase we can use localName. This were just fixed while we're in the area.
Part of #3154.
domenic
force-pushed
the
faster-string-ops
branch
from
March 15, 2025 11:09
c968af5 to
bb741a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3154.