Skip to content

Commit 809f81e

Browse files
committed
swap inline
1 parent 16f80d8 commit 809f81e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ pub fn escape_generic<S: AsRef<str>>(input: S) -> String {
130130
}
131131

132132
/// Main entry point for JSON string escaping with SIMD acceleration
133-
#[inline]
134133
pub fn escape<S: AsRef<str>>(input: S) -> String {
135134
#[cfg(target_arch = "x86_64")]
136135
{

src/x86.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ fn sub(a: *const u8, b: *const u8) -> usize {
3030
}
3131

3232
#[target_feature(enable = "avx512f", enable = "avx512bw")]
33+
#[inline]
3334
pub unsafe fn escape_avx512<S: AsRef<str>>(input: S) -> String {
3435
let s = input.as_ref();
3536
let bytes = s.as_bytes();
@@ -249,6 +250,7 @@ pub unsafe fn escape_avx512<S: AsRef<str>>(input: S) -> String {
249250
}
250251

251252
#[target_feature(enable = "avx2")]
253+
#[inline]
252254
pub unsafe fn escape_avx2<S: AsRef<str>>(input: S) -> String {
253255
let s = input.as_ref();
254256
let bytes = s.as_bytes();
@@ -488,6 +490,7 @@ pub unsafe fn escape_avx2<S: AsRef<str>>(input: S) -> String {
488490
}
489491

490492
#[target_feature(enable = "sse2")]
493+
#[inline]
491494
pub unsafe fn escape_sse2<S: AsRef<str>>(input: S) -> String {
492495
let s = input.as_ref();
493496
let bytes = s.as_bytes();

0 commit comments

Comments
 (0)