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

WIP: Faster countmap for small bit type e.g. Int8, UInt8, UInt16, Int16, Float16 #334

Closed
xiaodaigh opened this issue Jan 1, 2018 · 3 comments

Comments

@xiaodaigh
Copy link
Contributor

These bits can only have 256 or 65536 distinct values. Instead of using (radix)sorting or Dict one can simply use an array (of size 256 or 65536) to hold and accumulate the results.

From my own testing it will result in 9x-3x speed up. See this gist for example implementation

@nalimilan
Copy link
Member

Makes sense. Feel free to make a PR. Having a special case for Float16 doesn't sound worth it, though, it doesn't seem very common to compute the frequency of floating point numbers, and Float16 is a very specific type.

@xiaodaigh
Copy link
Contributor Author

Implemented in #339

@xiaodaigh
Copy link
Contributor Author

merged #339

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

No branches or pull requests

2 participants