Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add benchmark data for testing non-vectorised paths #1026

Merged
merged 3 commits into from
Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ public class Perf_BitArray
{
private const int DefaultShiftCount = 17;
private const bool BooleanValue = true;

[Params(Utils.DefaultCollectionSize)]
// 4 - Small size to test non-vectorised paths
// DefaultCollectionSize - Big enough size to go through the vectorised paths
[Params(4, Utils.DefaultCollectionSize)]
public int Size { get; set; }

private BitArray _original;
Expand Down
2 changes: 2 additions & 0 deletions src/benchmarks/micro/corefx/System.Runtime/Perf.String.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ public string TrimEnd_CharArr(string s, char[] c)
=> s.TrimEnd(c);

[Benchmark]
[Arguments("Hello", 'l', '!')] // Contains two 'l'
[Arguments("Hello", 'a', 'b')] // Contains one 'a'
[Arguments("This is a very nice sentence", 'z', 'y')] // 'z' does not exist in the string
[Arguments("This is a very nice sentence", 'i', 'I')] // 'i' occuress 3 times in the string
public string Replace_Char(string text, char oldChar, char newChar)
Expand Down