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

Rewrite GetIndexOfFirstNonAsciiByte #104503

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
69a7473
Rewrite GetIndexOfFirstNonAsciiByte
neon-sunset Jul 6, 2024
f04b90c
Improve lengths 32 and 64
neon-sunset Jul 6, 2024
2033692
Reduce scalar path code size, use cheaper instructions on x86, align …
neon-sunset Jul 7, 2024
3e3e527
Address feedback, add scalar and big endian fallback
neon-sunset Jul 15, 2024
dbdb108
Fix alignment calculation, improve codegen for x86_64
neon-sunset Jul 15, 2024
9decfef
Deduplicate helpers
neon-sunset Jul 15, 2024
8e4894a
Merge branch 'main' into ascii-validation
neon-sunset Jul 15, 2024
e9bd242
Temporarily extend asserts
neon-sunset Jul 16, 2024
d29c1f3
Temporarily comment out the assert
neon-sunset Jul 16, 2024
826d205
Cleanup
neon-sunset Jul 16, 2024
94947b7
Merge branch 'main' into ascii-validation
neon-sunset Jul 16, 2024
423eb39
Handle big endian correctly in the scalar path and remove generic SIM…
neon-sunset Jul 17, 2024
4698b75
Merge branch 'main' into ascii-validation
neon-sunset Jul 18, 2024
07d9b36
Last one fix for Big Endian
neon-sunset Jul 18, 2024
51900ab
Merge branch 'main' into ascii-validation
neon-sunset Jul 18, 2024
a14019e
Merge branch 'main' into ascii-validation
neon-sunset Aug 6, 2024
7970c46
Merge branch 'main' into ascii-validation
neon-sunset Aug 17, 2024
7b3dd0f
Merge branch 'main' into ascii-validation
neon-sunset Aug 25, 2024
18c1402
Merge branch 'main' into ascii-validation
neon-sunset Sep 1, 2024
90a3765
Merge branch 'main' into ascii-validation
neon-sunset Sep 7, 2024
b15e54b
Merge branch 'main' into ascii-validation
neon-sunset Sep 21, 2024
6371c2b
Merge branch 'main' into ascii-validation
neon-sunset Oct 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ private protected sealed override unsafe int GetCharCountFast(byte* pBytes, int
{
// Unrecognized fallback mechanism - count bytes manually.

charCount = (int)Ascii.GetIndexOfFirstNonAsciiByte(pBytes, (uint)bytesLength);
// TODO: Migrate to byref
charCount = (int)Ascii.GetIndexOfFirstNonAsciiByte(ref Unsafe.AsRef<byte>(pBytes), (uint)bytesLength);
}

bytesConsumed = charCount;
Expand Down
Loading
Loading