Skip to content

port SpanHelpers.IndexOfAny(ref byte, byte, byte, byte, int) to Vector128/256 - #73481

Merged
adamsitnik merged 3 commits into
dotnet:mainfrom
adamsitnik:spanHelpersRemainings
Aug 11, 2022
Merged

port SpanHelpers.IndexOfAny(ref byte, byte, byte, byte, int) to Vector128/256#73481
adamsitnik merged 3 commits into
dotnet:mainfrom
adamsitnik:spanHelpersRemainings

Conversation

@adamsitnik

Copy link
Copy Markdown
Member

The perf is on par for both x64 and arm64.

Details
BenchmarkDotNet=v0.13.1.1828-nightly, OS=ubuntu 20.04
Unknown processor
.NET SDK=7.0.100-rc.1.22405.1
[Host] : .NET 7.0.0 (7.0.22.40308), Arm64 RyuJIT AdvSIMD
Job-NXYOFV : .NET 7.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
Job-PVCGZI : .NET 7.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
MethodToolchainSizeMeanRatio
IndexOfAnyTwoValues/PR/corerun51237.13 ns0.98
IndexOfAnyTwoValues/main/corerun51237.98 ns1.00
BenchmarkDotNet=v0.13.1.1828-nightly, OS=Windows 11 (10.0.22000.795/21H2)
AMD Ryzen Threadripper PRO 3945WX 12-Cores, 1 CPU, 24 logical and 12 physical cores
.NET SDK=7.0.100-preview.7.22377.5
[Host] : .NET 7.0.0 (7.0.22.37506), X64 RyuJIT AVX2
Job-MXBRWB : .NET 7.0.0 (42.42.42.42424), X64 RyuJIT AVX2
Job-ABDMTJ : .NET 7.0.0 (42.42.42.42424), X64 RyuJIT AVX2
MethodToolchainSizeMeanRatio
IndexOfAnyTwoValues\PR\corerun.exe5128.696 ns1.03
IndexOfAnyTwoValues\baseline\corerun.exe5128.475 ns1.00

It's the last SpanHelper method from the #64451 TODO list!

@adamsitnikadamsitnik added this to the 7.0.0 milestone Aug 5, 2022
@ghostghost assigned adamsitnikAug 5, 2022
@ghost

ghost commented Aug 5, 2022

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-system-memory
See info in area-owners.md if you want to be subscribed.

Issue Details

The perf is on par for both x64 and arm64.

Details
BenchmarkDotNet=v0.13.1.1828-nightly, OS=ubuntu 20.04
Unknown processor
.NET SDK=7.0.100-rc.1.22405.1
[Host] : .NET 7.0.0 (7.0.22.40308), Arm64 RyuJIT AdvSIMD
Job-NXYOFV : .NET 7.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
Job-PVCGZI : .NET 7.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
MethodToolchainSizeMeanRatio
IndexOfAnyTwoValues/PR/corerun51237.13 ns0.98
IndexOfAnyTwoValues/main/corerun51237.98 ns1.00
BenchmarkDotNet=v0.13.1.1828-nightly, OS=Windows 11 (10.0.22000.795/21H2)
AMD Ryzen Threadripper PRO 3945WX 12-Cores, 1 CPU, 24 logical and 12 physical cores
.NET SDK=7.0.100-preview.7.22377.5
[Host] : .NET 7.0.0 (7.0.22.37506), X64 RyuJIT AVX2
Job-MXBRWB : .NET 7.0.0 (42.42.42.42424), X64 RyuJIT AVX2
Job-ABDMTJ : .NET 7.0.0 (42.42.42.42424), X64 RyuJIT AVX2
MethodToolchainSizeMeanRatio
IndexOfAnyTwoValues\PR\corerun.exe5128.696 ns1.03
IndexOfAnyTwoValues\baseline\corerun.exe5128.475 ns1.00

It's the last SpanHelper method from the #64451 TODO list!

Author:adamsitnik
Assignees:-
Labels:

area-System.Memory, tenet-performance

Milestone:7.0.0

@tannergooding

Copy link
Copy Markdown
Member

Just noting that its somewhat unfortunate we're only testing 512 for this test and others. It means we're not seeing numbers for other interesting sizes. In particular, I'd think that most powers of 2 from 8-512 are interesting to look at when making such changes and I'd expect that inputs under 64-bytes might see a regression, but that its an overall acceptable tradeoff.

@adamsitnik
adamsitnik merged commit 402aa85 into dotnet:mainAug 11, 2022
@ghostghost locked as resolved and limited conversation to collaborators Sep 10, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Memorytenet-performancePerformance related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@adamsitnik@tannergooding