upgraded vsort a bit (50-100ms)
This commit is contained in:
parent
520db7049d
commit
bff96c8f7f
2
ypsu.cpp
2
ypsu.cpp
@ -184,7 +184,7 @@
|
||||
free(buf);
|
||||
}
|
||||
void vsort(uint32_t *a, int n) {
|
||||
static thread_local std::vector<uint32_t> bts[256];
|
||||
thread_local std::vector<uint32_t> bts[256];
|
||||
for (int shift = 0; shift < 32; shift += 8) {
|
||||
for (int i = 0; i < n; i++) bts[a[i] >> shift & 0xff].push_back(a[i]);
|
||||
for (int bt = 0, k = 0; bt < 256; bt++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user