-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove an unnecessary branch from Log2Floor
Neither of the callsites using Helpers.Log2Floor ever pass a 0, so the special case to return -1 in the 0 case is unnecessary. BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.2314) Unknown processor .NET SDK 9.0.100 [Host] : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2 Job-JLJFKR : .NET Framework 4.8.1 (4.8.9282.0), X64 RyuJIT VectorSize=256 Job-PXVNHY : .NET Framework 4.8.1 (4.8.9282.0), X64 RyuJIT VectorSize=256 Job-DVRAUN : .NET 6.0.36 (6.0.3624.51421), X64 RyuJIT AVX2 Job-GQEZIF : .NET 6.0.36 (6.0.3624.51421), X64 RyuJIT AVX2 Job-PUVQSP : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2 Job-YPVVHF : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2 Job-MKMULB : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2 Job-PYOQFK : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2 | Method | Runtime | BuildConfiguration | Mean | Error | StdDev | Median | Ratio | RatioSD | Rank | Code Size | |---------- |------------------- |------------------- |----------:|----------:|----------:|----------:|------:|--------:|-----:|----------:| | Log2Floor | .NET Framework 4.8 | Previous | 8.2904 ns | 0.1383 ns | 0.1155 ns | 8.2723 ns | 1.00 | 0.02 | 2 | 186 B | | Log2Floor | .NET Framework 4.8 | Default | 7.8699 ns | 0.0244 ns | 0.0204 ns | 7.8673 ns | 0.95 | 0.01 | 1 | 170 B | | | | | | | | | | | | | | Log2Floor | .NET 6.0 | Previous | 0.3634 ns | 0.0273 ns | 0.0256 ns | 0.3612 ns | 1.00 | 0.10 | 2 | 25 B | | Log2Floor | .NET 6.0 | Default | 0.0527 ns | 0.0175 ns | 0.0164 ns | 0.0534 ns | 0.15 | 0.05 | 1 | 14 B | | | | | | | | | | | | | | Log2Floor | .NET 8.0 | Previous | 0.1953 ns | 0.0041 ns | 0.0037 ns | 0.1947 ns | 1.00 | 0.03 | 2 | 25 B | | Log2Floor | .NET 8.0 | Default | 0.0030 ns | 0.0064 ns | 0.0053 ns | 0.0000 ns | 0.02 | 0.03 | 1 | 14 B | | | | | | | | | | | | | | Log2Floor | .NET 9.0 | Previous | 0.2028 ns | 0.0030 ns | 0.0028 ns | 0.2025 ns | 1.00 | 0.02 | 2 | 25 B | | Log2Floor | .NET 9.0 | Default | 0.0147 ns | 0.0064 ns | 0.0057 ns | 0.0127 ns | 0.07 | 0.03 | 1 | 14 B |
- Loading branch information
1 parent
74847fd
commit 4854273
Showing
6 changed files
with
36 additions
and
35 deletions.
There are no files selected for viewing
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
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
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
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
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
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