Sample for using package Etimo.Benchmarks Read more at http://etimo.se/blog/etimo-benchmarks-lightweight-net-benchmark-tool/
Fork of Microsofts dotnet/perfomance code, Reporting project packaged. See here https://github.com/dotnet/performance
Support package for Advent of Code, download input files, submit answers, ChatGPT integration, and benchmark with BenchmarkDotNet.
This is a flexible performance benchmark framework. The framework provides custom attributes in order to tag benchmark classes and methods. NPerf uses attributes in much the same may as Nunit. This library is a complete re-write of Jonathan de Halleux's original Nperf framework http://www.codeproject.com/Articles/5945/NPerf-A-Performance-Benchmark-Framework-for-NET, and should be 100% backward compatible.
Fast .NET object-to-object mapper with AutoMapper's API (CreateMap, ForMember, Profile, IMapper). Maps compile to expression trees on first use. Includes DI (AddEggMapper), IQueryable projection (ProjectTo), flattening, records, collections, configuration validation that names the fix, and llms.txt guidance for AI coding assistants. Benchmarks against AutoMapper, Mapster and Mapperly are in the README.
NBenchmark is the easiest way to measure the speed of your .NET code. With zero setup and a focus on simplicity, you can go from installation to your first accurate benchmark in seconds - perfect for quick checks and full performance suites alike.
CSharpRAPL is a framework for benchmarking C# in regards to energy. In the Benchmarks folder, all the benchmarks created for this project can be found. CSharpRAPL contains the library code we have implemented to use for benchmarking. This code is a continuation and extension of lrecht/ParadigmComparison, which is an earlier university project. By default, the CSharpRAPL tries to make each loop iteration take 2 seconds called Dynamic Loop Iteration Scaling. CSharpRAPL also has Dynamic Iteration Calculation which scales the number of loop iterations according to the deviation of the results. The results generated is a CSV file that contains the DRAM Energy, Temperature, Elapsed Time, Package Energy, and the return value of the Benchmark.
.NET extensions and helpers for types in System.Core.
A library to convert different temperature types. A collection of dotnet extension methods for the following types: * int * long * float * double * string Benchmark details can be found at the following link: https://github.com/Daeer-Projects/Converter.Temperature/wiki/Benchmark-Results If you like this library, please give the repo a start.
Provides a wrapper around BenchmarkDotNet for the purposes of determining if a change is faster, smaller, or more memory efficient.
Unified Concurrency Tests: - wrapper for the .Net SpinLock, - TicketSpinLock, - Lock replacement of C# lock (Monitor), - wrapper around C# lock (monitor) benchmarking only, - async/await AsyncLock, - async/await AsyncSpinLock, - async/await AsyncTicketSpinLock.
Training pipeline for the ML.NET intent classifier — generates training data, trains a model, and benchmarks it against the TF-IDF baseline.
A load generator command-line tool for testing websites and HTTP APIs
This is IKVM compatible lucene benchmark package. This is used in FlexSearch (http://flexsearch.net).
dotnet template for BenchmarkDotNet benchmarks in C#.
An idiomatic bulk insert interface for databases. Allows you to bulk insert arbitrary types to an underlying database using a fast insert mechanism specific for that database. Currently supports SQL Server, MySQL, and SQLite. Works on the IDbConnection with extension methods, like Dapper.
Common classes from dotNetTips.com that can be used with BenchmarkDotNet.
# EmitMapper ## Project Description [ ](https://github.com/niubilitynetcore/EmitMapper/actions/workflows/dotnet.yml) [ ](https://www.nuget.org/packages/Niubility.EmitMapper/) ## What is EmitMapper EmitMapper is a small library for parsing object-object clones, typically used to convert data objects into domain objects and vice versa. Powerful customizable tool for mapping entities to each other. Entities can be plain objects, DataReaders, SQL commands and anything you need. The tool uses run-time code generation via the Emit library. It is useful for dealing with DTO objects, data access layers an so on. ## How do I get started? ```c# var simple = Mapper.Default.GetMapper<BenchNestedSource, BenchNestedDestination>(); BenchNestedDestination dest = simple.Map(_benchSource); //for single object; List<BenchNestedDestination> dests = simple.MapEnum(_benchSources1000List);// for list object ``` ## Supported platforms: * NETStandard 2.1 * .Net Framework 4.8 * net 6.0 * netcore app 3.1 ### Where can I get it? First, [install NuGet](http://docs.nuget.org/docs/start-here/installing-nuget). Then, install [EmitMapper](https://www.nuget.org/packages/Niubility.EmitMapper/) from the package manager console: ```dos Install-Package Niubility.EmitMapper ``` ## About Emit Mapper * Overview * Benefits of EmitMapper * Getting started * Type conversion * Customization # Customization overview Customization using default configurator * Default configurator overview * Custom converters * Custom converters_for_generics * Null substitution * Ignoring members * Custom constructors * Shallow and_deep_mapping * Names matching * Post processing Low-level customization using custom configuratorors # Emit Mapper in practice. * Benchmark: EmitMapper vs Handwritten code vs AutoMapper * Objects change tracking * Mapping DbDatareader to objects * Mapping objects to DbCommand (UPDATE and INSERT) Last edited Jan 11, 2010 at 3:01 PM by romankovs ## Benchmark ``` ini BenchmarkDotNet=v0.13.1, OS=Windows 10.0.18363.2037 (1909/November2019Update/19H2) Intel Core i5-8350U CPU 1.70GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical cores .NET SDK=6.0.101 [Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT .NET 6.0 : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT Job=.NET 6.0 Runtime=.NET 6.0 ``` | Method | Mean | Error | StdDev | Median | Ratio | Gen 0 | Gen 1 | Allocated | |----------------------------- |---------------:|------------:|------------:|---------------:|------:|-------:|-------:|----------:| | BenchNested_a_HardMapper | 0.8563 ns | 0.0173 ns | 0.0341 ns | 0.8489 ns | 1.00 | 0.0010 | - | 3 B | | BenchNested_b_EmitMapper | 0.8897 ns | 0.0431 ns | 0.1264 ns | 0.8451 ns | 1.00 | 0.0010 | - | 3 B | | BenchNested_c_AutoMapper | 16.5678 ns | 0.7823 ns | 2.2945 ns | 16.7384 ns | 1.00 | 0.0009 | - | 3 B | | BenchNested1000_a_HardMapper | 3,988.9549 ns | 79.6474 ns | 97.8142 ns | 3,965.5109 ns | 1.00 | 0.4766 | 0.2344 | 3,024 B | | BenchNested1000_b_EmitMapper | 3,781.9851 ns | 74.5756 ns | 122.5298 ns | 3,776.3773 ns | 1.00 | 0.4766 | 0.2344 | 3,024 B | | BenchNested1000_c_AutoMapper | 16,978.1985 ns | 333.1485 ns | 396.5896 ns | 16,966.0594 ns | 1.00 | 0.4688 | 0.2188 | 3,033 B | | SimpleTypes_a_HardMapper | 0.0310 ns | 0.0008 ns | 0.0023 ns | 0.0307 ns | 1.00 | 0.0000 | - | - | | SimpleTypes_b_EmitMapper | 0.0512 ns | 0.0009 ns | 0.0010 ns | 0.0513 ns | 1.00 | 0.0000 | - | - | | SimpleTypes_c_AutoMapper | 0.1718 ns | 0.0035 ns | 0.0076 ns | 0.1709 ns | 1.00 | 0.0000 | - | - | | SimpleTypes100_a_HardMapper | 4.0774 ns | 0.0804 n
# 2026-11-15 - V6 - ExcelFAST - ⛓️💥 **Breaking Change(s)** - If you want to use `Async` then create a `new Excel_PRIMEAsync()` - Same applies to `Xlsb` - Use `ReadOnlySpan<Cell>` instead of `ArraySegment<Cell>` - Using foreach over ReadOnlySpan<T> is guaranteed to be allocation-free and boxing-free. If you need LINQ-style processing on a span without allocations, iterate using for or foreach directly over the span - ✅ **ExcelFAST High-Throughput Subsystem**: - ✅ Dedicated zero-allocation sequential reader pipeline (`IExcelFast`, `ISheetFast`, `IRowFast`). - ✅ Format-specific implementations: `ExcelFastXlsx` for OpenXML (.xlsx) and `ExcelFastXlsb` for binary OpenXML (.xlsb). - ✅ Array pooling integration (`ReadOnlySpan<Cell>`) with `PooledCellView` and thread-static buffers for zero GC allocation during hot iteration loops. - ✅ Full support across .NET 8.0, .NET 9.0, and .NET 10.0. - ✅ Integrated test suite and benchmarking coverage in `ExcelFAST.Tests`. - ✅ Add .Net11 TFM support across all four target frameworks (`net8.0`, `net9.0`, `net10.0`, `net11.0`) - Replaced the previous float round-trip memory comparison in CellValue.IsExactlyDouble with a fast memory-overlay check on the underlying 64-bit decimal mantissa (lo64 <= 999_999_999_999_999UL and hi == 0). - ✅ A separate nuget for ExcelFAST - ✅ Performance Optimizations for Prime (See breaking changes above) # 2026-10-18 - V5 nuget update - Update nugets - Made benchmarks run .net**9** and .net**10** as well - **Memory & Allocation Optimizations** - Some tinkering in the way memory is used and allocated, especially in the Xlsb workflow - Eliminated String Caching Overhead: Removed the ConcurrentDictionary cache for small strings in CellValue, which introduced locking and hashing overhead during high-volume parsing. - Simplified SIMD Decoding: Reverted SimdStringDecoder.cs to use Vector<ushort> instead of explicit Vector512/Vector256/Vector128 branching, reducing overhead for common short strings. - Optimized Column Parsing: Replaced SearchValues with simple loops in ExcelColumns.cs for cell reference parsing, as the overhead of SearchValues was counterproductive for 1-3 character strings. - Tuned Method Inlining: Removed AggressiveOptimization from several complex methods to allow better JIT tiered compilation and reduce instruction cache pressure.
Shared abstractions and reusable building blocks for NBenchmark integration packages.
Benchmarking tools for the Advent of C# framework.
Benchmark binding library for Bridge.NET projects.
A lightweight performance benchmark tool published by Etimo The key points are: - Lightweight and simple to use, for individual component benchmarking or for comparing different components - Supports specifying nested groups of delegates to be benchmarked hierarchically and in order - Focuses on the benchmark processing and simply returns an object with the results that can easily be consumed in order to write the results to the console/file/other - Released to the public domain, so you can do what you want with the source code Read more at http://etimo.se/blog/etimo-benchmarks-lightweight-net-benchmark-tool/
Benchmarking library for Roslyn components.
Visualizes your BenchmarkDotNet benchmarks to colorful images, feature-rich HTML, and customizable markdown files (and maybe powerful charts in the future!)
.NET benchmarking library for Revit
A simple .NET utility to benchmark the performance of (often stochastic) algorithms. The typical usage is to benchmark various configurations of a stochastic algorithm and compare how they perform both result-wise and speed-wise. It is not meant to perform microbenchmarks.
NBenchmark analyzers and code fixes for detecting and resolving common benchmark configuration issues at compile time
# EmitMapper ## Project Description [ ](https://github.com/niubilitynetcore/EmitMapper/actions/workflows/dotnet.yml) [ ](https://www.nuget.org/packages/Niubility.EmitMapper/) ## What is EmitMapper EmitMapper is a small library for parsing object-object clones, typically used to convert data objects into domain objects and vice versa. Powerful customizable tool for mapping entities to each other. Entities can be plain objects, DataReaders, SQL commands and anything you need. The tool uses run-time code generation via the Emit library. It is useful for dealing with DTO objects, data access layers an so on. ## How do I get started? ```c# var simple = Mapper.Default.GetMapper<BenchNestedSource, BenchNestedDestination>(); BenchNestedDestination dest = simple.Map(_benchSource); //for single object; List<BenchNestedDestination> dests = simple.MapEnum(_benchSources1000List);// for list object ``` ## Supported platforms: * NETStandard 2.1 * .Net Framework 4.8 * net 6.0 * netcore app 3.1 ### Where can I get it? First, [install NuGet](http://docs.nuget.org/docs/start-here/installing-nuget). Then, install [EmitMapper](https://www.nuget.org/packages/Niubility.EmitMapper/) from the package manager console: ```dos Install-Package Niubility.EmitMapper ``` ## About Emit Mapper * Overview * Benefits of EmitMapper * Getting started * Type conversion * Customization # Customization overview Customization using default configurator * Default configurator overview * Custom converters * Custom converters_for_generics * Null substitution * Ignoring members * Custom constructors * Shallow and_deep_mapping * Names matching * Post processing Low-level customization using custom configuratorors # Emit Mapper in practice. * Benchmark: EmitMapper vs Handwritten code vs AutoMapper * Objects change tracking * Mapping DbDatareader to objects * Mapping objects to DbCommand (UPDATE and INSERT) Last edited Jan 11, 2010 at 3:01 PM by romankovs ## Benchmark ``` ini BenchmarkDotNet=v0.13.1, OS=Windows 10.0.18363.2037 (1909/November2019Update/19H2) Intel Core i5-8350U CPU 1.70GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical cores .NET SDK=6.0.101 [Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT .NET 6.0 : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT Job=.NET 6.0 Runtime=.NET 6.0 ``` | Method | Mean | Error | StdDev | Median | Ratio | Gen 0 | Gen 1 | Allocated | |----------------------------- |---------------:|------------:|------------:|---------------:|------:|-------:|-------:|----------:| | BenchNested_a_HardMapper | 0.8563 ns | 0.0173 ns | 0.0341 ns | 0.8489 ns | 1.00 | 0.0010 | - | 3 B | | BenchNested_b_EmitMapper | 0.8897 ns | 0.0431 ns | 0.1264 ns | 0.8451 ns | 1.00 | 0.0010 | - | 3 B | | BenchNested_c_AutoMapper | 16.5678 ns | 0.7823 ns | 2.2945 ns | 16.7384 ns | 1.00 | 0.0009 | - | 3 B | | BenchNested1000_a_HardMapper | 3,988.9549 ns | 79.6474 ns | 97.8142 ns | 3,965.5109 ns | 1.00 | 0.4766 | 0.2344 | 3,024 B | | BenchNested1000_b_EmitMapper | 3,781.9851 ns | 74.5756 ns | 122.5298 ns | 3,776.3773 ns | 1.00 | 0.4766 | 0.2344 | 3,024 B | | BenchNested1000_c_AutoMapper | 16,978.1985 ns | 333.1485 ns | 396.5896 ns | 16,966.0594 ns | 1.00 | 0.4688 | 0.2188 | 3,033 B | | SimpleTypes_a_HardMapper | 0.0310 ns | 0.0008 ns | 0.0023 ns | 0.0307 ns | 1.00 | 0.0000 | - | - | | SimpleTypes_b_EmitMapper | 0.0512 ns | 0.0009 ns | 0.0010 ns | 0.0513 ns | 1.00 | 0.0000 | - | - | | SimpleTypes_c_AutoMapper | 0.1718 ns | 0.0035 ns | 0.0076 ns | 0.1709 ns | 1.00 | 0.0000 | - | - | | SimpleTypes100_a_HardMapper | 4.0774 ns | 0.0804 n
1) Unified Concurrency The main mission is to unify usage of heterogeneous synchronization primitives with interface/pattern based Object Oriented approach. Switching between multiple synchronization primitives with one code line change! Agile Development ready solution to synchronization. Easy upgrade from general threading to async/await thanks to the pattern based design! Reduced code complexity. Easy correctness testing. Simplified performance optimization. Currently implemented synchronization primitives cover: - wrapper for the .Net SpinLock, - TicketSpinLock, - Lock replacement of C# lock (Monitor), - wrapper around C# lock (monitor) benchmarking only, - async/await AsyncLock, - async/await AsyncSpinLock, - async/await AsyncTicketSpinLock. https://www.codeproject.com/Articles/1236238/Unified-Concurrency-I-Introduction https://www.codeproject.com/Articles/1237518/Unified-Concurrency-II-benchmarking-methodologies https://www.codeproject.com/Articles/1242156/Unified-Concurrency-III-cross-benchmarking 2) AsyncTesting SequencerUC A strongly typed Sequencer is a powerful threading or async/await based unit testing tool to simplify and test correctness in asynchronous and/or parallel code. The Sequencer allows to simplify control/detection of one or many testing thread flows and allows to deterministically setup testing scenario from unit test method and optionally inject data into the tested code to ensure required state. 3) Concurrent Priority Queues Awaitable Concurrent Priority Queue - Optionally awaitable simple to use Concurrent Priority Queue. https://www.codeproject.com/Articles/1222893/Optionally-Awaitable-Concurrent-Priority-Queue
Benchmark .NET source code to compare which is more efficient.
Sort faster than Array.Sort(). MiceSort() : Single-task. A little faster. Most reliable in this library. BothSidesNowSort() : Multi-task. Time is less than half on intel i5 note(2 core 4 threads). 1. Usage var sort = new SortEnvironment<T>() { // T -> element (class or value type) Data = {IList<T>}, // Name of T[], List<T> or other class based on IList<T> Compare = {Comparison<T>}, // Compare function // InverseOrder = true, // true = Descending // AlmostSorted = true, // true = Time may be shortened when data is almost sorted. Otherwise, time is late. // Partial = 0, // Partial sort setting. Number larger than 0 = The specified amount of high-order elements are sorted. CoreCacheAmount = 256, // Data amount within each core cache. 2^N. You need to set eligible value for your sortings and CPU. 256 is initial value when omitted. (Experimental value in my PC) // Below are only for 'BothSidesNowSort' // TaskAmount = 4, // Parallel task amount. Thread amount of CPU is initial value when omitted. // RedZone = true, // true = Full throttle. Faster but danger. false = Under limiter. More safety. // MakeWayFor = false // true = Idle cores make way for non-sort task. Time becomes slow. }; sort.BothSidesNowSort(); // Or sort.MiceSort(); Or call Array<T>.Sort() compatible shape below. Replace * to BothSidesNowSort or MiceSort ArraySort<T>.*(T[]); ArraySort<T>.*(T[], IComparer<T> or Comparison<T>); ListSort<T>.*(List<T>); ListSort<T>.*(List<T>, IComparer<T> or Comparison<T>); 2. Character Method : In-place merge sort. Bottom-up approach. Stable : Yes Memory : Stack [log2(N/M) * 3 * int size * task amount]. (N is Data length. M is CoreCacheAmount.) : Instead of log2(N/M) calculation, 100 is used. [I think it sufficient safety size and present PC don't mind it.] : And BothSidesNowSort() multi-core control uses additional array [N/M * int size]. Time : Comparison: O(NlogN) : Move: O(NlogN^2) when N is small, O(NlogN) when N is large. [My persume. Not decision] 3. Notice - Exclusive use of challengers and human sacrifices to brand new technology This is good tool for confirming your PC CPU core/thread true ability. I can't assure this library stands up to actual purpose. You must prepare your own risk. Reliability : "Mice sort" > "Both sides now sort(RedZone = false)" > "Both sides now sort(RedZone = true)". - When comparison function is time consuming, it is faster than Array.Sort(). But when comparison function is subtraction only like common sort benchmark, slower than Array.Sort(). - This function is available to IList<T> interface implemented array structure class. (T[], List<T>) It can't sort LinkedList<T> because the class has no link patch function. (C# LinkedList<T> originally has no sort function. Array shape or LinQ(not In-place) may be standard in C# sorting.) 4. Algorithm Below article includes almost theory I am using but the list includes many bugs. https://www.codeproject.com/Articles/5275988/Fastest-Sort-Algorithm
Rich terminal table output for NBenchmark using Spectre.Console.
Resolves benchmark classes from an IServiceProvider so they can have constructor dependencies.
A C# benchmark comparison tool for analyzing performance across git references
Run NBenchmark benchmarks as NUnit tests with configurable performance thresholds.
Compilation benchmark for Windows. How fast can your computer compile .NET code?
Run NBenchmark benchmarks as MSTest tests with configurable performance thresholds.
Run NBenchmark benchmarks as xUnit tests with configurable performance thresholds.