Skip to content

Commit 6a18486

Browse files
committed
Apply change to other occurrences
1 parent 5769ee5 commit 6a18486

File tree

6 files changed

+6
-54
lines changed

6 files changed

+6
-54
lines changed

bench/algorithm/json-serde/1.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ private static void PrintHash(string s)
3232
{
3333
using var hasher = MD5.Create();
3434
var hash = hasher.ComputeHash(Encoding.UTF8.GetBytes(s));
35-
Console.WriteLine(ToHexString(hash));
36-
}
37-
38-
static string ToHexString(byte[] ba)
39-
{
40-
StringBuilder hex = new StringBuilder(ba.Length * 2);
41-
foreach (byte b in ba)
42-
hex.AppendFormat("{0:x2}", b);
43-
return hex.ToString();
35+
Console.WriteLine(Convert.ToHexStringLower(hash));
4436
}
4537
}

bench/algorithm/json-serde/2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private static void PrintHash(byte[] bytes)
3030
{
3131
using MD5 hasher = MD5.Create();
3232
byte[] hash = hasher.ComputeHash(bytes);
33-
Console.WriteLine(Convert.ToHexString(hash).ToLower());
33+
Console.WriteLine(Convert.ToHexStringLower(hash));
3434
}
3535
}
3636
internal sealed class GeoData

bench/algorithm/mandelbrot/2.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static void Main(string[] args)
4444

4545
using var hasher = MD5.Create();
4646
var hash = hasher.ComputeHash(data);
47-
Console.WriteLine(ToHexString(hash));
47+
Console.WriteLine(Convert.ToHexStringLower(hash));
4848
}
4949

5050
static byte mbrot8((Vector<double>, Vector<double>) cr, double civ)
@@ -103,14 +103,4 @@ static byte mbrot8((Vector<double>, Vector<double>) cr, double civ)
103103
}
104104
return accu;
105105
}
106-
107-
static string ToHexString(byte[] ba)
108-
{
109-
StringBuilder hex = new StringBuilder(ba.Length * 2);
110-
foreach (byte b in ba)
111-
{
112-
hex.AppendFormat("{0:x2}", b);
113-
}
114-
return hex.ToString();
115-
}
116106
}

bench/algorithm/mandelbrot/3.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static void Main(string[] args)
9292

9393
using var hasher = MD5.Create();
9494
var hash = hasher.ComputeHash(data);
95-
Console.WriteLine(ToHexString(hash));
95+
Console.WriteLine(Convert.ToHexStringLower(hash));
9696
}
9797

9898
unsafe static byte mbrot8(F64x8 cr, double civ)
@@ -144,14 +144,4 @@ unsafe static byte mbrot8(F64x8 cr, double civ)
144144
}
145145
return accu;
146146
}
147-
148-
static string ToHexString(byte[] ba)
149-
{
150-
StringBuilder hex = new StringBuilder(ba.Length * 2);
151-
foreach (byte b in ba)
152-
{
153-
hex.AppendFormat("{0:x2}", b);
154-
}
155-
return hex.ToString();
156-
}
157147
}

bench/algorithm/mandelbrot/9-m.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,7 @@ public static unsafe void Main(string[] args)
8383
});
8484
using var hasher = MD5.Create();
8585
var hash = hasher.ComputeHash(data);
86-
Console.WriteLine(ToHexString(hash));
86+
Console.WriteLine(Convert.ToHexStringLower(hash));
8787
}
8888
}
89-
90-
static string ToHexString(byte[] ba)
91-
{
92-
StringBuilder hex = new StringBuilder(ba.Length * 2);
93-
foreach (byte b in ba)
94-
{
95-
hex.AppendFormat("{0:x2}", b);
96-
}
97-
return hex.ToString();
98-
}
9989
}

bench/algorithm/mandelbrot/9.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,7 @@ public static unsafe void Main(string[] args)
8383
}
8484
using var hasher = MD5.Create();
8585
var hash = hasher.ComputeHash(data);
86-
Console.WriteLine(ToHexString(hash));
86+
Console.WriteLine(Convert.ToHexStringLower(hash));
8787
}
8888
}
89-
90-
static string ToHexString(byte[] ba)
91-
{
92-
StringBuilder hex = new StringBuilder(ba.Length * 2);
93-
foreach (byte b in ba)
94-
{
95-
hex.AppendFormat("{0:x2}", b);
96-
}
97-
return hex.ToString();
98-
}
9989
}

0 commit comments

Comments
 (0)