Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Optimize FindFirstCharToEncode for JavaScriptEncoder.Default using Ssse3 intrinsics #42073

Merged
merged 36 commits into from
Nov 3, 2019
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
bb040e0
Use Sse2 instrinsics to make NeedsEscaping check faster for large
ahsonkhan Oct 17, 2019
b7dbe9d
Update the utf-8 bytes needsescaping and add tests.
ahsonkhan Oct 17, 2019
405cb89
Merge branch 'master' of https://github.com/dotnet/corefx into Improv…
ahsonkhan Oct 17, 2019
f454359
Remove unnecessary bitwise OR and add more tests
ahsonkhan Oct 21, 2019
477b642
Add more tests around surrogates, invalid strings, and characters >
ahsonkhan Oct 21, 2019
c6c78a4
NeedsEscaping-check with bitmasks
gfoidl Oct 19, 2019
cfacc85
char-input uses byte-codepath
gfoidl Oct 19, 2019
ea2a4ba
Minimize overhead
gfoidl Oct 19, 2019
734f92e
Renamed NeedsEscapingSsse3 to CreateEscapingMaskSsse3 to be in sync w…
gfoidl Oct 21, 2019
9cba98a
Added comments for the bit-mask
gfoidl Oct 21, 2019
48c7483
Rewritten to use pointer arithmetic
gfoidl Oct 21, 2019
b3732bc
Perf-tuning and processing of the remainder vectorized when above a t…
gfoidl Oct 21, 2019
9fdc85a
Bug fix
gfoidl Oct 23, 2019
0f1ddcb
Move using directive within ifdef to make it clear when its used.
ahsonkhan Oct 23, 2019
887d605
Overhead minimized
gfoidl Oct 23, 2019
e8895e0
Add more tests for custom text encoder case.
ahsonkhan Oct 23, 2019
7693801
Fix typo in comment gaurd -> guard
ahsonkhan Oct 23, 2019
590f52a
Merge branch 'master' into ImproveEscapingCheck
gfoidl Oct 23, 2019
51a837f
Fix up the using directives that got removed during merge conflict
ahsonkhan Oct 23, 2019
fdc254c
Applied code from iteration in S.T.Json to S.T.E.Web
gfoidl Oct 23, 2019
a513077
TextEncoder.DoesAsciiNeedEncoding reduced to plain lookup
gfoidl Oct 23, 2019
4766c0f
Removed System.Runtime.Intrinsics from S.T.Json
gfoidl Oct 23, 2019
3c5127a
Fixed build-failure
gfoidl Oct 24, 2019
af841ec
Revert "TextEncoder.DoesAsciiNeedEncoding reduced to plain lookup"
gfoidl Oct 24, 2019
2cbc2a2
Fixed netfx build failure and PR feedback
gfoidl Oct 24, 2019
9419ff4
Fixed bug with null-ptr
gfoidl Oct 24, 2019
3d03226
Reduce overhead
gfoidl Oct 24, 2019
2a64063
Address feedback - fix 0x7F case, rename vectors to be self-documenting.
ahsonkhan Oct 25, 2019
4c18251
Merge remote-tracking branch 'remotes/ahsonkhan/AddTextEncoderTests' …
gfoidl Oct 25, 2019
3b6659b
Renamed mask vectors to be on par with Sse2Helper
gfoidl Oct 25, 2019
2c68710
Removed AggressiveInlining from FindFirstCharacterToEncode
gfoidl Oct 25, 2019
e412e1e
Reduced overhead
gfoidl Oct 25, 2019
a0b9a69
PR Feedback
gfoidl Oct 25, 2019
cad3cb6
Better code for "not equal to zero" in Ssse3Helper
gfoidl Nov 2, 2019
1efba41
PR feedback
gfoidl Nov 2, 2019
033ed82
Merge branch 'master' into ImproveEscapingCheck
gfoidl Nov 2, 2019
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
PR Feedback
  • Loading branch information
gfoidl committed Oct 25, 2019
commit a0b9a6915ba5de2ee6d258e8d2fc373c642bdd90
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public override unsafe int FindFirstCharacterToEncode(char* text, int textLength

Debug.Assert(textLength >= 0);


if (textLength == 0)
{
goto AllAllowed;
Expand Down Expand Up @@ -117,7 +116,7 @@ public override unsafe int FindFirstCharacterToEncode(char* text, int textLength
while (ptr < end);

AllAllowed:
idx = -1; // All characters are allowed.
idx = -1;

Return:
return idx;
Expand Down Expand Up @@ -255,7 +254,7 @@ public override unsafe int FindFirstCharacterToEncodeUtf8(ReadOnlySpan<byte> utf
while (ptr < end);

AllAllowed:
idx = -1; // all characters allowed
idx = -1;

Return:
return idx;
Expand Down