Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Use __lzcnt as __builtin_clz in VS2008 or up#101

Closed
JayXon wants to merge 1 commit into
google:masterfrom
JayXon:lzcnt
Closed

Use __lzcnt as __builtin_clz in VS2008 or up#101
JayXon wants to merge 1 commit into
google:masterfrom
JayXon:lzcnt

Conversation

@JayXon
Copy link
Copy Markdown
Contributor

@JayXon JayXon commented Apr 9, 2016

__lzcnt is documented here:
https://msdn.microsoft.com/en-us/library/bb384809.aspx
This improves speed of a VS2015 x64 build by more than 10%.

__lzcnt is documented here:
https://msdn.microsoft.com/en-us/library/bb384809.aspx
This improves speed of a VS2015 x64 build by more than 10%.
@JayXon
Copy link
Copy Markdown
Contributor Author

JayXon commented Apr 9, 2016

It turns out that lzcnt requires Haswell, and will be treated as bsr on older cpu, so I came up with another PR #102

@JayXon JayXon closed this Apr 9, 2016
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.

1 participant