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

A handful of codegen improvements #531

Merged
merged 9 commits into from
Mar 15, 2021
Merged

Conversation

MihaZupan
Copy link
Collaborator

  • Added a PeekChar() overload of PeekChar(int) to ICharIterator. This method was already present on StringSlice, but since it was missing on the interface, callers were often binding to the slower overload
  • Added SkipChar to ICharIterator
  • Replaced CurrentCharacter == '\0' and Length == 0 with faster IsEmpty checks
  • Avoided a bunch of struct copies in StringLineGroup
  • Changed the NewLine.Length() to a bit operation
  • Simplified/optimized logic in HtmlHelper
  • Avoided the ToUtf32 iterator allocations in Globalization extension

@iamcarbon
Copy link
Contributor

Consider renaming SkipChar to Advance() and adding an Advance(count) overload to match SequenceReader naming.

@xoofx xoofx merged commit c680910 into xoofx:master Mar 15, 2021
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.

3 participants