Skip to content
Open
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
a3dd262
wip
nielsdos Feb 3, 2025
144b0e1
shift opt
nielsdos Feb 3, 2025
7d485a9
Get rid of acc
nielsdos Feb 3, 2025
58f30ff
SSE2 guard
nielsdos Feb 3, 2025
6a01058
use ascii
nielsdos Feb 3, 2025
55a0b0e
dynamic mask
nielsdos Feb 3, 2025
2a2008e
comment
nielsdos Feb 3, 2025
7c966a6
wip
nielsdos Feb 3, 2025
65f3b7e
wip
nielsdos Feb 3, 2025
124396a
potential solution
nielsdos Feb 3, 2025
1826161
remove some debug
nielsdos Feb 3, 2025
5a2c034
correct ifdefs, without resolver support
nielsdos Feb 3, 2025
326b982
Attempt to use standard bitset stuff
nielsdos Feb 3, 2025
db54e3f
preliminary resolver support (needs more work)
nielsdos Feb 3, 2025
8bcd6bb
fix native build
nielsdos Feb 3, 2025
d7f2562
let ci run without max_shift trick to compare perf
nielsdos Feb 4, 2025
2b11554
Revert "let ci run without max_shift trick to compare perf"
nielsdos Feb 4, 2025
ef72f33
Reduce overhead of worst case to 1.5x
nielsdos Feb 4, 2025
e3baa23
wip1
nielsdos Feb 4, 2025
3c8b68e
cheaper pos compute
nielsdos Feb 4, 2025
4d16463
no magic nrs
nielsdos Feb 4, 2025
27a89e0
simple heuristic
nielsdos Feb 4, 2025
b071dba
various small improvements
nielsdos Feb 5, 2025
2ae769e
save ci resources
nielsdos Feb 5, 2025
10bd63a
test with always inline
nielsdos Feb 5, 2025
5df25a4
tweak
nielsdos Feb 5, 2025
d5c5b9f
code layout trick (vtune dsb improvement)
nielsdos Feb 5, 2025
ceb8443
skip extra check
nielsdos Feb 5, 2025
81efe6b
tweak
nielsdos Feb 5, 2025
1d7109d
abstract away
nielsdos Feb 6, 2025
45e91f5
mark branch
nielsdos Feb 6, 2025
dfd6de0
split off
nielsdos Feb 6, 2025
ff4ef5b
cs
nielsdos Feb 6, 2025
57efb3a
fix mask on sse2 builds
nielsdos Feb 6, 2025
df0117e
test
nielsdos Feb 6, 2025
246b413
tweaks
nielsdos Feb 6, 2025
847497f
tweak
nielsdos Feb 6, 2025
901a957
flag
nielsdos Feb 6, 2025
8947f09
tighter code layout
nielsdos Feb 6, 2025
4c41ad3
Remove check
nielsdos Feb 6, 2025
40cd08f
Tweak
nielsdos Feb 6, 2025
dfb690d
Code layout and comment tweak
nielsdos Feb 6, 2025
bd6e462
test with indirect function ptr
nielsdos Feb 6, 2025
8d5a381
Revert "test with indirect function ptr"
nielsdos Feb 6, 2025
d4297de
code layout
nielsdos Feb 6, 2025
bc48fb8
wip
nielsdos Feb 7, 2025
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
Prev Previous commit
Next Next commit
SSE2 guard
  • Loading branch information
nielsdos committed Feb 3, 2025
commit 58f30ff1ee29bedd38ce1680b02fb126ab33ec20
2 changes: 2 additions & 0 deletions ext/json/json_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ zend_result php_json_escape_string(
0xffffffff, 0x500080c4, 0x10000000, 0x00000000,
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff};

#ifdef __SSE2__
while (len >= sizeof(__m128i)) {
const __m128i input = _mm_loadu_si128((__m128i *) (s + pos));
const __m128i input_range = _mm_cmpgt_epi8(input, _mm_set1_epi8(31));
Expand Down Expand Up @@ -538,6 +539,7 @@ zend_result php_json_escape_string(
if (!len) {
break;
}
#endif

us = (unsigned char)s[pos];
if (EXPECTED(!ZEND_BIT_TEST(charmap, us))) {
Expand Down