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

simd int and string parsing on aarch64 #65

Merged
merged 36 commits into from Apr 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5c2d9cb
experiment with int parsing speedups
samuelcolvin Jan 20, 2024
a605ea0
fix tess
samuelcolvin Jan 20, 2024
486097e
tweak big int parsing
samuelcolvin Jan 20, 2024
d5679fa
simd int parsing on aarch64
samuelcolvin Jan 21, 2024
b09d73a
linting
samuelcolvin Jan 21, 2024
bf5cefa
test on macos-latest-xlarge
samuelcolvin Jan 22, 2024
e02f4fd
tweaks
samuelcolvin Jan 22, 2024
f4c00aa
fix ci
samuelcolvin Jan 22, 2024
ebbbc3d
separate simd_aarch64
samuelcolvin Jan 23, 2024
72b421a
simd string parsing for aarch64
samuelcolvin Jan 23, 2024
7e6d5b3
linting
samuelcolvin Jan 24, 2024
2272c41
fix ci
samuelcolvin Jan 26, 2024
58180c0
inlining
samuelcolvin Jan 26, 2024
79de565
simplify somewhat
samuelcolvin Jan 26, 2024
320bb78
more tests
samuelcolvin Jan 26, 2024
cc9a6b3
simplify logic after end of string
samuelcolvin Feb 4, 2024
8379b9d
tweaks
samuelcolvin Feb 4, 2024
dc09f12
bump
samuelcolvin Feb 4, 2024
fb5952c
improve non-ascii checks
samuelcolvin Feb 6, 2024
764c857
fuzz on aarch64
samuelcolvin Feb 6, 2024
a896baf
simplify short int parsing
samuelcolvin Feb 6, 2024
9f976d6
fix tests, address one comment
samuelcolvin Mar 28, 2024
c09ef8a
static ONGOING_CHUNK_SIZE
samuelcolvin Mar 28, 2024
6f386fc
fix benchmarks
samuelcolvin Mar 28, 2024
3aeb18a
fix comments
samuelcolvin Mar 28, 2024
47aba14
remove on_backslash macro
samuelcolvin Mar 28, 2024
37eb734
add cargo-careful
samuelcolvin Mar 28, 2024
5bda07f
without cargo cache
samuelcolvin Mar 28, 2024
c442f2f
fixes required by careful
samuelcolvin Mar 28, 2024
74ef054
bump rust cache
samuelcolvin Mar 28, 2024
4c6e06c
clarify ONGOING_CHUNK_MULTIPLIER
samuelcolvin Apr 1, 2024
195f97d
move comment
samuelcolvin Apr 1, 2024
0f8e3c0
NumberInt::try_from(&[u8])
samuelcolvin Apr 1, 2024
2ba4502
one more test
samuelcolvin Apr 1, 2024
328f357
update README
samuelcolvin Apr 1, 2024
fc7570a
Merge branch 'main' into int-simd
samuelcolvin Apr 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/number_decoder.rs
Expand Up @@ -85,7 +85,7 @@
json_err!(InvalidNumber, index)
}
} else {
json_err!(EofWhileParsingValue, index)

Check warning on line 88 in src/number_decoder.rs

View check run for this annotation

Codecov / codecov/patch

src/number_decoder.rs#L88

Added line #L88 was not covered by tests
}
}
}
Expand Down Expand Up @@ -210,7 +210,7 @@
let (chunk, new_index) = IntChunk::parse_big(data, index);
match chunk {
IntChunk::Ongoing(value) => {
big_value *= POW_10[new_index - index];
big_value *= ONGOING_CHUNK_SIZE;
big_value += value;
index = new_index;
}
Expand Down Expand Up @@ -252,6 +252,11 @@
10u64.pow(17),
];

#[cfg(target_arch = "aarch64")]
static ONGOING_CHUNK_SIZE: u64 = POW_10[16];
#[cfg(not(target_arch = "aarch64"))]
static ONGOING_CHUNK_SIZE: u64 = POW_10[17];
samuelcolvin marked this conversation as resolved.
Show resolved Hide resolved

pub(crate) enum IntChunk {
Ongoing(u64),
Done(u64),
Expand Down