x86simdsort::object_qsort for int16_t
Opened this issue · 8 comments
x86simdsort::object_qsort for object with extractor return type int16_t does not work
undefined reference to `void x86simdsort::keyvalue_qsort<short, unsigned int>(short*, unsigned int*, unsigned long, bool, bool)'
@Serge-sudo Currently x86simdsort::object_qsort it is only supported when extractor type returns a 32-bit and 64-bit data types. Is it possible to up-cast the int16_t to int32_t?
Yep. I just wanted to use int16_t for faster result, as in one simd instruction we can fit two times more int16 than int32
Right, unfortunately we don't have a SIMD implementation for keyvalue sort which the objectsort relies on.
Is it something hard to implement ?, or just unusable? The function x86simdsort::qsort can work over int16 just fine.
Not really, just haven't prioritized it for lack of a use case it can benefit from.
@Serge-sudo what is the length of your array? I realized if you have an array size > 2 ** 16, then you can't use a <16-bit, 16-bit> key-value sort and a <16bit, 32-bit> key value will be only as fast as <32-bit, 32-bit> key value sort and wont help with performance.
My array can have different sizes. I decided to use <32-bit, 32-bit> anyway. but if for <2**16 this stuff can run faster, maybe for future one can implement branching depending on size.