Skip to content

Commit

Permalink
Merge pull request #11 from simdutf/AVX2_UTF8_validation_daniel
Browse files Browse the repository at this point in the history
Some possible optimizations.
  • Loading branch information
Nick-Nuon authored Jan 30, 2024
2 parents 66d51f5 + 7bc999b commit 713d29b
Show file tree
Hide file tree
Showing 2 changed files with 279 additions and 145 deletions.
6 changes: 3 additions & 3 deletions benchmark/Benchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected void IntroduceError(byte[] utf8, Random random)
{
utf8[position + 1] = (byte)((utf8[position + 1] & 0b11000011) | (s << 2));
errorIntroduced = true;
break; // Just introduce one surrogate error
break; // Just introduce one surrogate error // TODO: having a loop that breaks immediately does not make much sense !!!!!!!!!!!!!!!!!!!!!!
}
}
break;
Expand Down Expand Up @@ -433,7 +433,7 @@ public class RealDataBenchmark : BenchmarkBase
@"data/turkish.utf8.txt",
@"data/german.utf8.txt",
@"data/japanese.utf8.txt")]
public string FileName;
public string? FileName;

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

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

Check warning on line 610 in benchmark/Benchmark.cs

View workflow job for this annotation

GitHub Actions / build

'ConfigExtensions.With(IConfig, SummaryStyle)' is obsolete: 'This method will soon be removed, please start using .WithSummaryStyle() instead.'

Check warning on line 610 in benchmark/Benchmark.cs

View workflow job for this annotation

GitHub Actions / build

'ConfigExtensions.With(IConfig, SummaryStyle)' is obsolete: 'This method will soon be removed, please start using .WithSummaryStyle() instead.'

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

0 comments on commit 713d29b

Please sign in to comment.