From bff96c8f7f8ef877b08b1df7c0a5b5c98eb89159 Mon Sep 17 00:00:00 2001 From: Richard Thier Date: Wed, 15 Dec 2021 12:53:00 +0100 Subject: [PATCH] upgraded vsort a bit (50-100ms) --- ypsu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ypsu.cpp b/ypsu.cpp index 1579a9d..76c81e8 100644 --- a/ypsu.cpp +++ b/ypsu.cpp @@ -184,7 +184,7 @@ free(buf); } void vsort(uint32_t *a, int n) { - static thread_local std::vector bts[256]; + thread_local std::vector 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++) {