Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@grant-d
Copy link

@grant-d grant-d commented Feb 9, 2019

There are several implementations of LeadingZeroCount in the stack, with differing or branch-heavy implementations.

  • This PR consolidates them into a central implementation that uses intrinsics & optimized software fallbacks.
  • Also fixes an issue in a related PR where explicit conversions to (IntPtr) was missing, causing some units to fail. Note the idiom used to convert from long to IntPtr inexpensively.
  • All BitOps methods pass units

cc @tannergooding

@grant-d grant-d changed the title Perf: BitOps.LeadingZeroCount Perf: Consolidate implementation of LeadingZeroCount Feb 9, 2019
@dotnet-bot
Copy link

Welcome to the dotnet/coreclr Perf help

The following is a list of valid commands on this PR. To invoke a command, comment the indicated phrase on the PR

The following commands are valid for all PRs and repositories.

Click to expand
Comment Phrase Action
@dotnet-bot test this please Re-run all legs. Use sparingly
@dotnet-bot test ci please Generates (but does not run) jobs based on changes to the groovy job definitions in this branch
@dotnet-bot help Print this help message

The following jobs are launched by default for each PR against dotnet/coreclr:master.

Click to expand
Comment Phrase Job Launched
@dotnet-bot test \QWindows_NT x64 full_opt ryujit CoreCLR Perf Tests Correctness\E Windows_NT x64 full_opt ryujit CoreCLR Perf Tests Correctness
@dotnet-bot test \QWindows_NT x64 min_opt ryujit CoreCLR Perf Tests Correctness\E Windows_NT x64 min_opt ryujit CoreCLR Perf Tests Correctness
@dotnet-bot test \QWindows_NT x86 full_opt ryujit CoreCLR Perf Tests Correctness\E Windows_NT x86 full_opt ryujit CoreCLR Perf Tests Correctness
@dotnet-bot test \QWindows_NT x86 min_opt ryujit CoreCLR Perf Tests Correctness\E Windows_NT x86 min_opt ryujit CoreCLR Perf Tests Correctness

The following optional jobs are available in PRs against dotnet/coreclr:master.

Click to expand
Comment Phrase Job Launched
@dotnet-bot test Windows_NT x64 illink Queues Windows_NT x64 full_opt ryujit IlLink Tests
@dotnet-bot test linux perf flow Queues Linux Perf Test Flow
@dotnet-bot test Windows_NT x64 perf Queues Windows_NT x64 full_opt ryujit CoreCLR Perf Tests
@dotnet-bot test Windows_NT x64 min_opts perf Queues Windows_NT x64 min_opt ryujit CoreCLR Perf Tests
@dotnet-bot test Windows_NT x86 perf Queues Windows_NT x86 full_opt ryujit CoreCLR Perf Tests
@dotnet-bot test Windows_NT x86 min_opts perf Queues Windows_NT x86 min_opt ryujit CoreCLR Perf Tests
@dotnet-bot test Windows_NT x64 perf scenarios Queues Windows_NT x64 full_opt ryujit Performance Scenarios Tests
@dotnet-bot test Windows_NT x64 min_opts perf scenarios Queues Windows_NT x64 min_opt ryujit Performance Scenarios Tests
@dotnet-bot test Windows_NT x64 perf scenarios Queues Windows_NT x64 tiered ryujit Performance Scenarios Tests
@dotnet-bot test Windows_NT x86 perf scenarios Queues Windows_NT x86 full_opt ryujit Performance Scenarios Tests
@dotnet-bot test Windows_NT x86 min_opts perf scenarios Queues Windows_NT x86 min_opt ryujit Performance Scenarios Tests
@dotnet-bot test Windows_NT x86 perf scenarios Queues Windows_NT x86 tiered ryujit Performance Scenarios Tests
@dotnet-bot test linux throughput flow Queues Linux arm Throughput Perf Test Flow
@dotnet-bot test linux throughput flow Queues Linux x64 Throughput Perf Test Flow
@dotnet-bot test Windows_NT x64 throughput Queues Windows_NT x64 full_opt ryujit nopgo CoreCLR Throughput Perf Tests
@dotnet-bot test Windows_NT x64 nopgo throughput Queues Windows_NT x64 full_opt ryujit pgo CoreCLR Throughput Perf Tests
@dotnet-bot test Windows_NT x64 min_opts throughput Queues Windows_NT x64 min_opt ryujit nopgo CoreCLR Throughput Perf Tests
@dotnet-bot test Windows_NT x64 min_opts nopgo throughput Queues Windows_NT x64 min_opt ryujit pgo CoreCLR Throughput Perf Tests
@dotnet-bot test Windows_NT x86 throughput Queues Windows_NT x86 full_opt ryujit nopgo CoreCLR Throughput Perf Tests
@dotnet-bot test Windows_NT x86 nopgo throughput Queues Windows_NT x86 full_opt ryujit pgo CoreCLR Throughput Perf Tests
@dotnet-bot test Windows_NT x86 min_opts throughput Queues Windows_NT x86 min_opt ryujit nopgo CoreCLR Throughput Perf Tests
@dotnet-bot test Windows_NT x86 min_opts nopgo throughput Queues Windows_NT x86 min_opt ryujit pgo CoreCLR Throughput Perf Tests

Have a nice day!

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@safern
Copy link
Member

safern commented Feb 13, 2019

@safern /azp commands works also for coreclr-ci? dotnet/corefx#35121 (comment)

The outerloop builds shouldn't since those are corefx specific, but the concept of everything else is the same.

@grant-d
Copy link
Author

grant-d commented Feb 13, 2019

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test please
@dotnet-bot test Windows_NT x64 Release CoreFX Tests please
@dotnet-bot test Ubuntu x64 Checked Innerloop Build and Test (Jit - TieredCompilation=0) please

@grant-d
Copy link
Author

grant-d commented Feb 13, 2019

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test please

@tannergooding tannergooding merged commit eee8c24 into dotnet:master Feb 13, 2019
@tannergooding
Copy link
Member

Thanks for the PR here @grant-d.

I'm fine with the two nits I had being looked at separately.

Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corefx that referenced this pull request Feb 13, 2019
…22497)

* Perf: BitOps.LeadingZeroCount

* CR fix

* CR fixes

* Optimization

* Revert

* Confirmed fix

* Simplify

* Return int

* Fixes

* Simplify

* CR fixes

* CR fixes

* Fix unit failure on Linux-musl x64 Debug

* CR fixes

* CR fixes

* Cleanup

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
@grant-d grant-d deleted the grant-d.lzcnt branch February 13, 2019 22:21
@grant-d
Copy link
Author

grant-d commented Feb 13, 2019

Thanks @tannergooding, @jkotas and @davidfowl
Appreciate the help and pointers

stephentoub pushed a commit to dotnet/corefx that referenced this pull request Feb 14, 2019
…22497)

* Perf: BitOps.LeadingZeroCount

* CR fix

* CR fixes

* Optimization

* Revert

* Confirmed fix

* Simplify

* Return int

* Fixes

* Simplify

* CR fixes

* CR fixes

* Fix unit failure on Linux-musl x64 Debug

* CR fixes

* CR fixes

* Cleanup

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/mono that referenced this pull request Feb 14, 2019
…22497)

* Perf: BitOps.LeadingZeroCount

* CR fix

* CR fixes

* Optimization

* Revert

* Confirmed fix

* Simplify

* Return int

* Fixes

* Simplify

* CR fixes

* CR fixes

* Fix unit failure on Linux-musl x64 Debug

* CR fixes

* CR fixes

* Cleanup

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corert that referenced this pull request Feb 14, 2019
…22497)

* Perf: BitOps.LeadingZeroCount

* CR fix

* CR fixes

* Optimization

* Revert

* Confirmed fix

* Simplify

* Return int

* Fixes

* Simplify

* CR fixes

* CR fixes

* Fix unit failure on Linux-musl x64 Debug

* CR fixes

* CR fixes

* Cleanup

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
jkotas pushed a commit to dotnet/corert that referenced this pull request Feb 14, 2019
…22497)

* Perf: BitOps.LeadingZeroCount

* CR fix

* CR fixes

* Optimization

* Revert

* Confirmed fix

* Simplify

* Return int

* Fixes

* Simplify

* CR fixes

* CR fixes

* Fix unit failure on Linux-musl x64 Debug

* CR fixes

* CR fixes

* Cleanup

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
marek-safar pushed a commit to mono/mono that referenced this pull request Feb 14, 2019
…22497)

* Perf: BitOps.LeadingZeroCount

* CR fix

* CR fixes

* Optimization

* Revert

* Confirmed fix

* Simplify

* Return int

* Fixes

* Simplify

* CR fixes

* CR fixes

* Fix unit failure on Linux-musl x64 Debug

* CR fixes

* CR fixes

* Cleanup

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
jkotas pushed a commit that referenced this pull request Feb 15, 2019
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/mono that referenced this pull request Feb 15, 2019
…22497)

* Perf: BitOps.LeadingZeroCount

* CR fix

* CR fixes

* Optimization

* Revert

* Confirmed fix

* Simplify

* Return int

* Fixes

* Simplify

* CR fixes

* CR fixes

* Fix unit failure on Linux-musl x64 Debug

* CR fixes

* CR fixes

* Cleanup

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/mono that referenced this pull request Feb 26, 2019
…22497)

* Perf: BitOps.LeadingZeroCount

* CR fix

* CR fixes

* Optimization

* Revert

* Confirmed fix

* Simplify

* Return int

* Fixes

* Simplify

* CR fixes

* CR fixes

* Fix unit failure on Linux-musl x64 Debug

* CR fixes

* CR fixes

* Cleanup

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…22497)

* Perf: BitOps.LeadingZeroCount

* CR fix

* CR fixes

* Optimization

* Revert

* Confirmed fix

* Simplify

* Return int

* Fixes

* Simplify

* CR fixes

* CR fixes

* Fix unit failure on Linux-musl x64 Debug

* CR fixes

* CR fixes

* Cleanup


Commit migrated from dotnet/coreclr@eee8c24
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants