James Turner

Results 175 comments of James Turner

Thanks @Peter-Optiway - I might use something similar to that in my project though would still be nice to have `IProgressBar` built-into the library itself. I'd be happy to write...

Yeah, a method that returns an `IProgress` is a good start. Ideally if there was one that already returned a `IProgress` without a conversion function would be best. I think...

Yeah, `System.Drawing.Color` isn't part of pre-netstardard 2.0 though do you still want to target versions older than that? If you're still hesitant, having a public constructor on `ConsoleTextColor` would then...

Thanks for the ideas! There is definitely a few I'll add!

Giving this another crack now... **.NET Framework Baseline** ``` BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19043.1348 (21H1/May2021Update) Intel Core i5-6600K CPU 3.50GHz (Skylake), 1 CPU, 4 logical and 4 physical cores .NET SDK=6.0.100 [Host]...

**With Branchless Min** | Method | NumberOfCharacters | Mean | Error | StdDev | Op/s | CacheMisses/Op | BranchMispredictions/Op | Code Size | Allocated | |-------------- |------------------- |----------------:|--------------:|--------------:|-------------:|---------------:|------------------------:|----------:|----------:| | Quickenshtein...

❌ **Branchless Min but without Outer Loop Unrolling** | Method | NumberOfCharacters | Mean | Error | StdDev | Op/s | BranchMispredictions/Op | CacheMisses/Op | Code Size | Allocated |...

❌ **Using SIMD in .NET Framework via Vectors** In defense of the code - it doesn't have `ShiftRightLogical128BitLane` so my hacked implementation isn't likely optimal. | Method | NumberOfCharacters |...

I tested the branchless code again for huge text and there really isn't any performance benefit which I find kinda strange. While there are a lot less branch mispredictions, the...

For my own curiousity, I wanted to see the scale of how the performance degraded for larger strings: | Method | NumberOfCharacters | Mean | Error | StdDev | Op/s...