aboutsummaryrefslogtreecommitdiff
path: root/core/hash/xxhash/common.odin
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-07-08 21:07:53 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-07-08 21:07:53 +0200
commit2d8d0dd8515a4598d6e027f28818614c117ae0c4 (patch)
treecf038003add5ddda2ef71395fe78a801c8a2abb0 /core/hash/xxhash/common.odin
parent1a20b78633038614635da99b5e634015d4ce7d6e (diff)
fix `@(optimization_mode)` usage in builtin collections
Diffstat (limited to 'core/hash/xxhash/common.odin')
-rw-r--r--core/hash/xxhash/common.odin10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/hash/xxhash/common.odin b/core/hash/xxhash/common.odin
index faf88e0d4..bbeb60db3 100644
--- a/core/hash/xxhash/common.odin
+++ b/core/hash/xxhash/common.odin
@@ -67,17 +67,17 @@ when !XXH_DISABLE_PREFETCH {
}
-@(optimization_mode="speed")
+@(optimization_mode="favor_size")
XXH_rotl32 :: #force_inline proc(x, r: u32) -> (res: u32) {
return ((x << r) | (x >> (32 - r)))
}
-@(optimization_mode="speed")
+@(optimization_mode="favor_size")
XXH_rotl64 :: #force_inline proc(x, r: u64) -> (res: u64) {
return ((x << r) | (x >> (64 - r)))
}
-@(optimization_mode="speed")
+@(optimization_mode="favor_size")
XXH32_read32 :: #force_inline proc(buf: []u8, alignment := Alignment.Unaligned) -> (res: u32) {
if XXH_FORCE_MEMORY_ACCESS == 2 || alignment == .Aligned {
#no_bounds_check b := (^u32le)(&buf[0])^
@@ -89,7 +89,7 @@ XXH32_read32 :: #force_inline proc(buf: []u8, alignment := Alignment.Unaligned)
}
}
-@(optimization_mode="speed")
+@(optimization_mode="favor_size")
XXH64_read64 :: #force_inline proc(buf: []u8, alignment := Alignment.Unaligned) -> (res: u64) {
if XXH_FORCE_MEMORY_ACCESS == 2 || alignment == .Aligned {
#no_bounds_check b := (^u64le)(&buf[0])^
@@ -99,4 +99,4 @@ XXH64_read64 :: #force_inline proc(buf: []u8, alignment := Alignment.Unaligned)
mem_copy(&b, raw_data(buf[:]), 8)
return u64(b)
}
-} \ No newline at end of file
+}