Skip to content

Commit 713d29b

Browse files
authored
Merge pull request #11 from simdutf/AVX2_UTF8_validation_daniel
Some possible optimizations.
2 parents 66d51f5 + 7bc999b commit 713d29b

File tree

2 files changed

+279
-145
lines changed

2 files changed

+279
-145
lines changed

benchmark/Benchmark.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ protected void IntroduceError(byte[] utf8, Random random)
9595
{
9696
utf8[position + 1] = (byte)((utf8[position + 1] & 0b11000011) | (s << 2));
9797
errorIntroduced = true;
98-
break; // Just introduce one surrogate error
98+
break; // Just introduce one surrogate error // TODO: having a loop that breaks immediately does not make much sense !!!!!!!!!!!!!!!!!!!!!!
9999
}
100100
}
101101
break;
@@ -433,7 +433,7 @@ public class RealDataBenchmark : BenchmarkBase
433433
@"data/turkish.utf8.txt",
434434
@"data/german.utf8.txt",
435435
@"data/japanese.utf8.txt")]
436-
public string FileName;
436+
public string? FileName;
437437

438438
private string[] _lines = Array.Empty<string>();
439439
private byte[][] _linesUtf8 = Array.Empty<byte[]>();
@@ -607,7 +607,7 @@ public static void Main(string[] args)
607607
}
608608

609609
// Create a BenchmarkDotNet config with a custom maximum parameter column width
610-
var config = DefaultConfig.Instance.With(SummaryStyle.Default.WithMaxParameterColumnWidth(100));
610+
var config = DefaultConfig.Instance.With(summaryStyle: SummaryStyle.Default.WithMaxParameterColumnWidth(100));
611611

612612
// Check if a specific argument (e.g., "runall") is provided
613613
if (args.Length > 0 && args[0] == "runall")

0 commit comments

Comments
 (0)