Skip to content

Instantly share code, notes, and snippets.

View udlose's full-sized avatar
:octocat:
Probably Benchmarking...

Dave Black udlose

:octocat:
Probably Benchmarking...
View GitHub Profile
@udlose
udlose / MethodCall_SealedVsNonSealedVsVirtual_Benchmark.cs
Last active January 27, 2025 23:13
Benchmark to measure performance difference between calling overridden methods on: open vs sealed classes
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
/// <summary>
/// Refer to the README.MD for details about:
/// 1. description of each benchmark
/// 2. results
/// 3. analysis of the results
///
/// </summary>
@udlose
udlose / Linq to Xml - XName Atomization Benchmark.cs
Created January 12, 2025 21:29
Linq to Xml - XName Atomization Benchmark
void Main()
{
var summary = BenchmarkRunner.Run<LinqToXmlXNameAtomizationBenchmark>();
// xml test data
//<aw:Root xmlns:aw="http://www.adventure-works.com">
// <aw:Data ID="1">4,100,000</aw:Data>
// <aw:Data ID="2">3,700,000</aw:Data>
// <aw:Data ID="3">1,150,000</aw:Data>
//</aw:Root>