This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[MemoryDiagnoser] | |
public class TryCatchWhenBenchmark | |
{ | |
[Params(100, 10_000, 100_000)] | |
public int Size; | |
[Benchmark] | |
public void WithIfElse() | |
{ | |
for (int i = 0; i < Size; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$entity ="team-logo"; | |
$id="nba@2020@3425"; | |
$devEnv ="https://host-import-api.sinclair-test.deltatre.digital/api/Editorial"; | |
$localEnv ="https://localhost:44317/api/Editorial"; | |
Invoke-Expression “cmd.exe /C start $($devEnv)/$($entity)/$($id)" | |
Invoke-Expression “cmd.exe /C start $($localEnv)/$($entity)/$($id)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$baseUrl ="https://localhost:44383/api/v1"; | |
$pages = | |
"/league/league-nba", | |
"/season/dir__league-nba", | |
"/season/season-nba-55467", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#LINQPad optimize+ | |
void Main() | |
{ | |
var summary = BenchmarkRunner.Run<StringEmptyTrimPerformance>(); | |
} | |
[MemoryDiagnoser] | |
public class StringEmptyTrimPerformance | |
{ | |
private List<string> items; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#LINQPad optimize+ | |
void Main() | |
{ | |
var summary = BenchmarkRunner.Run<StringNullOrEmptyPerformance>(); | |
} | |
[MemoryDiagnoser] | |
public class StringNullOrEmptyPerformance | |
{ | |
private List<string> items; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#LINQPad optimize+ | |
void Main() | |
{ | |
var summary = BenchmarkRunner.Run<StringConcatenationPerformance>(); | |
} | |
[MemoryDiagnoser] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#LINQPad optimize+ | |
void Main() | |
{ | |
var summary = BenchmarkRunner.Run<SortVsOrderbyPerformance>(); | |
} | |
[MemoryDiagnoser] | |
public class SortVsOrderbyPerformance | |
{ | |
private List<int> itemsForSort = new List<int>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#LINQPad optimize+ | |
void Main() | |
{ | |
var summary = BenchmarkRunner.Run<ListCapacityPerformance>(); | |
} | |
[MemoryDiagnoser] | |
public class ListCapacityPerformance | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#LINQPad optimize+ | |
void Main() | |
{ | |
var summary = BenchmarkRunner.Run<HashSetPerformance>(); | |
} | |
public class HashSetPerformance | |
{ | |
private HashSet<int> set; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#LINQPad optimize+ | |
void Main() | |
{ | |
var summary = BenchmarkRunner.Run<DuplicatePerformance>(); | |
} | |
[MemoryDiagnoser] | |
public class DuplicatePerformance | |
{ | |
private List<int> items; |
NewerOlder