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

Consolidate SSE optimized shuffle with Blosc. #11

Open
kiyo-masui opened this issue Aug 31, 2014 · 5 comments
Open

Consolidate SSE optimized shuffle with Blosc. #11

kiyo-masui opened this issue Aug 31, 2014 · 5 comments

Comments

@kiyo-masui
Copy link
Owner

Both Bitshuffle and Blosc/c-blosc@b37ca0b implement optimized (SSE2) versions of shuffle for 16, 32, and 64 bit element sizes. In Bitshuffle these routines are bshuf_trans_byte_elem_*. The operation counts for the two implementations appear to be the same be we should check which versions are fastest and consolidate them.

Bitshuffle also has optimized code for if the elements size is a multiple of 32 or 64 bits, which is useful for compound data types and could benefit Blosc.

@kif
Copy link
Contributor

kif commented Nov 8, 2019

To emphasize on this, the bitunshuffle uses an extra temporary buffer betweed the byte-transpose and the bitwise transpose. I believe this reduces drastically the performances when the buffer size increases
https://github.com/kiyo-masui/bitshuffle/blob/master/src/bitshuffle_core.c#L1297

I did some alternative implementation which use a limited number of vectors (8, 16, 32 or 64) for temporary storage. This allows to make best use of the L1 cache instead of going to the L3 cache which is usually shared between the cores.

@kiyo-masui
Copy link
Owner Author

Keep in mind that the whole operation is blocked in small blocks of 8k bytes, which does fit in cache.

@kif
Copy link
Contributor

kif commented Nov 8, 2019 via email

@kiyo-masui
Copy link
Owner Author

Looking at your slides, you are testing the version of bitshuffle that ships with blosc? Can you post some test code?

@kif
Copy link
Contributor

kif commented Nov 8, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants