Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dense map to the API language. #2173

Merged
merged 1 commit into from
Aug 30, 2018
Merged

Conversation

AWoloszyn
Copy link
Contributor

This allows us to create maps that exist in the 0->n where
n is small. This provides some performance boost.

TODO: Make the same optimization on the Golang side, this should
provide better performance there too.

This reduces trace overhead by ~10% for a particularly heavy
vulkan application.

This allows us to create maps that exist in the 0->n where
n is small. This provides some performance boost.

TODO: Make the same optimization on the Golang side, this should
provide better performance there too.

This reduces trace overhead by ~10% for a particularly heavy
vulkan application.
@AWoloszyn AWoloszyn merged commit a2fe9e8 into google:master Aug 30, 2018
@AWoloszyn AWoloszyn deleted the dense-map branch August 30, 2018 18:53

template<typename T, bool DENSE>
typename std::enable_if<!std::is_integral<T>::value, uint64_t>::type dense_hash(const T& t) {
return 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we delete this implementation so that it won't compile if the key is non-integral (that or put some statement in here that doesn't compile with a comment)? Doesn't seem like you'd ever want this to compile...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can once
// TODO(awoloszyn): Template tricks to move this to compile-time
is resolved. Until then we have a dynamic check, which means this will need to compile.

ben-clayton added a commit to ben-clayton/gapid that referenced this pull request Sep 11, 2018
ben-clayton added a commit that referenced this pull request Sep 11, 2018
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.

3 participants