Skip to content

Add perf tests for BitArray#610

Merged
adamsitnik merged 2 commits intodotnet:masterfrom
BruceForstall:AddBitArrayPerfTests
Jul 4, 2019
Merged

Add perf tests for BitArray#610
adamsitnik merged 2 commits intodotnet:masterfrom
BruceForstall:AddBitArrayPerfTests

Conversation

@BruceForstall
Copy link
Contributor

Add tests for And, Or, Xor, LeftShift, RightShift

Add tests for And, Or, Xor, LeftShift, RightShift
Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@BruceForstall
Copy link
Contributor Author

@adamsitnik Looks like net461 doesn't have LeftShift/RightShift

[2019/07/03 18:53:04][INFO] corefx\System.Collections\Perf.BitArray.cs(78,55): error CS1061: 'BitArray' does not contain a definition for 'RightShift' and no accessible extension method 'RightShift' accepting a first argument of type 'BitArray' could be found (are you missing a using directive or an assembly reference?) [C:\dotnetbuild\work\42f98a9c-fd7b-4660-bff6-2169a4c04152\Payload\src\benchmarks\micro\MicroBenchmarks.csproj]
[2019/07/03 18:53:04][INFO] corefx\System.Collections\Perf.BitArray.cs(81,54): error CS1061: 'BitArray' does not contain a definition for 'LeftShift' and no accessible extension method 'LeftShift' accepting a first argument of type 'BitArray' could be found (are you missing a using directive or an assembly reference?) [C:\dotnetbuild\work\42f98a9c-fd7b-4660-bff6-2169a4c04152\Payload\src\benchmarks\micro\MicroBenchmarks.csproj]

It's available on Core from 2.0 onwards (https://docs.microsoft.com/en-us/dotnet/api/system.collections.bitarray.leftshift)

Is there a way to conditionalize based on that?

I actually didn't care much about those, since I wasn't working on them, but just noticed they were missing a test. So I could just remove them.

@BruceForstall
Copy link
Contributor Author

Ok I found #if !NETFRAMEWORK

@adamsitnik adamsitnik merged commit ce894ee into dotnet:master Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants