Just for fun I ran a BenchmarkDotNet comparison between .NET Framework 4.8 and .NET 7 for some reflection related functionality … Continue reading .NET Framework 4.8 v .NET 7 reflection performance benchmarks
Category: .NET Core Blog
How to spilt a collection into sub collections of a certain size in .NET 6+ using the LINQ Chunk method
FYI, in .NET 6+ the Chunk LINQ method is useful for splitting up sequences into sub sequences of a certain … Continue reading How to spilt a collection into sub collections of a certain size in .NET 6+ using the LINQ Chunk method
.NET 7 increment operator ++ and +1 compiling differently
Since they are equivalent ++ and +1 should compile to the same code, right? As we can see below, this … Continue reading .NET 7 increment operator ++ and +1 compiling differently
Benchmark custom code workarounds against each new version of .NET as the framework gets faster all the time
Always revisit and benchmark your custom code workarounds with each version of .NET. The .NET framework and the JIT compiler gets faster … Continue reading Benchmark custom code workarounds against each new version of .NET as the framework gets faster all the time
Use new StringSyntax Attribute in .NET 7 to give semantic meaning to strings
FYI… the StringSyntax Attribute is new in .NET 7 and allows us to tell Visual Studio what kind of string … Continue reading Use new StringSyntax Attribute in .NET 7 to give semantic meaning to strings
.NET ChatGPT example – API controller using injected repository and DTO mapped to model using explicit operator
I love ChatGPT and previously posted an example of some ChatGPT generated code to create a controller, with DTO and … Continue reading .NET ChatGPT example – API controller using injected repository and DTO mapped to model using explicit operator
ChatGPT generated .NET CRUD controller with DTO mapped to domain model using AutoMapper
It’s not perfect but I’m absolutely loving ChatGPT. ChatGPT-3 (current version as of writing) is trained on 175 billion parameters, … Continue reading ChatGPT generated .NET CRUD controller with DTO mapped to domain model using AutoMapper
String + versus StringBuilder benchmarks for 50K one char concatenations in .NET 7
I’m sure there’s still some junior .NET devs using + to concatenate large (usually an unknown) amounts of strings? Look … Continue reading String + versus StringBuilder benchmarks for 50K one char concatenations in .NET 7
Poll Results : Will you use .NET 7 in production even though it’s not an LTS release
.NET 7 was released in November (2022) and includes a lot of awesome new features and performances improvements. It is … Continue reading Poll Results : Will you use .NET 7 in production even though it’s not an LTS release
ASP.NET application output now available in integrated Visual Studio window
FYI… in the latest Visual Studio 2022 preview (version 17.5 Preview 2) we can view the application output for ASP.NET projects … Continue reading ASP.NET application output now available in integrated Visual Studio window
.NET nostalgia – Wrox .NET books from the 2000s and 2010s
Who remembers the big red Wrox books which were popular in the mid 2000s and early 2010s? Wrox used to … Continue reading .NET nostalgia – Wrox .NET books from the 2000s and 2010s
.NET 8 alpha version available on GitHub.com/dotnet
For the real .NET nerds amongst us the .NET 8 alpha version installer is available on GitHub.com/dotnet/installer. To see what’s … Continue reading .NET 8 alpha version available on GitHub.com/dotnet
Poll Results : Do you put MediatR command/query and related handler in same file?
Personally I think MediatR can add unneeded complexity to a project but when using it one thing I like to … Continue reading Poll Results : Do you put MediatR command/query and related handler in same file?
How to select BenchmarkDotNet benchmark in the console at runtime
If you have a set of benchmarks and are looking to run different ones at different times you can manually … Continue reading How to select BenchmarkDotNet benchmark in the console at runtime
String.Replace performance improvements in .NET 5 v .NET 6 v .NET 7
It’s amazing to see the performance improvements of String.Replace across multiple versions of .NET 🚀🚀🚀🚀. When you have such a … Continue reading String.Replace performance improvements in .NET 5 v .NET 6 v .NET 7
.NET 7 has string concatenation related performance regressions
I quite often post about performance improvements from one version of .NET to another BUT sometimes performance regressions happen. I … Continue reading .NET 7 has string concatenation related performance regressions
Poll Results : What IDE do .NET developers use mostly?
I ran a poll on my LinkedIn and Twitter profiles recently wondering if Rider or Visual Studio was used more? … Continue reading Poll Results : What IDE do .NET developers use mostly?
.NET 7 simple string concatenation benchmarks
Not too much change from .NET 6 string concatenation benchmarks I ran previously. String.Join still is the fastest while String … Continue reading .NET 7 simple string concatenation benchmarks
Remove columns in BenchmarkDotNet result table
BenchmarkDotNet v0.13.2 was released recently and one of the new features is the ability to remove columns from the results … Continue reading Remove columns in BenchmarkDotNet result table
Faster HTTP/2 uploads in .NET 7
.NET 7 will have significantly faster HTTP/2 uploads 💪 … Quote from the Microsoft blog -> 👇 “We’ve increased Kestrel’s default … Continue reading Faster HTTP/2 uploads in .NET 7
HtmlDecode performance improvements in .NET 7
.NET 7 has significantly improved the performance of WebUtility.HtmlDecode 💪🏻 … The previous implementation had been manually iterating through each … Continue reading HtmlDecode performance improvements in .NET 7
.NET 7 LINQ performance improvements
There’s be some amazing performance improvements in certain LINQ methods in .NET 7 compared to .NET 6. Look at the … Continue reading .NET 7 LINQ performance improvements
Poll Results : What’s the most used version of .NET?
I was curious to see what version of .NET people were using for their apps so ran a poll on … Continue reading Poll Results : What’s the most used version of .NET?
How to set time unit in BenchmarkDotNet results
Explicitly setting the time measurement unit which BenchmarkDotNet should display results in is easy… 👇🏻
How to have multiple baselines in BenchmarkDotNet
Without doing anything else if we try to mark two or more benchmark methods as baselines BenchmarkDotNet will complain… .. … Continue reading How to have multiple baselines in BenchmarkDotNet