Boxify superslab registry, add bench profile, and document C7 hotpath experiments
This commit is contained in:
15
core/box/c7_hotpath_env_box.h
Normal file
15
core/box/c7_hotpath_env_box.h
Normal file
@ -0,0 +1,15 @@
|
||||
// c7_hotpath_env_box.h - ENV gate for C7 hotpath
|
||||
// Purpose: isolate the ENV handling so hotpath code can assume gate済み。
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
// ENV gate: HAKMEM_TINY_C7_HOT=1 で有効化(デフォルト OFF)
|
||||
static inline int tiny_c7_hot_enabled(void) {
|
||||
static int g_enable = -1;
|
||||
if (__builtin_expect(g_enable == -1, 0)) {
|
||||
const char* e = getenv("HAKMEM_TINY_C7_HOT");
|
||||
g_enable = (e && *e && *e != '0') ? 1 : 0;
|
||||
}
|
||||
return g_enable;
|
||||
}
|
||||
Reference in New Issue
Block a user