Skip to content

Expanding StringTokenizator with ReadOnlySpan. #17645

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

Merged
merged 3 commits into from
Dec 5, 2024

Conversation

Meloman19
Copy link
Contributor

What does the pull request do?

Returns ReadOnlySpan<char> as CurrentToken instead of string substring.

What is the current behavior?

CurrentToken always create new string instance (via Substring).

What is the updated/expected behavior with this PR?

In new runtimes (greater than Standard), this reduces allocations by parsing int and double directly from Span.

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053711-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Copy link
Member

@maxkatz6 maxkatz6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@maxkatz6 maxkatz6 added this pull request to the merge queue Dec 5, 2024
Merged via the queue into AvaloniaUI:master with commit 18fcfcc Dec 5, 2024
10 checks passed
@Meloman19 Meloman19 deleted the dev/tokenizer_with_span branch December 5, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants