function
unsafe.setJITPolicy
scale: number
): void;
Scale JavaScriptCore's JIT tier-up thresholds for the current thread's VM.
1 is the normal JIT policy. A value > 1 makes the JIT that many times more reluctant to compile, e.g. during a burst of run-once startup code; it stays in effect until the next call. bun build --compile executables can start with a scale baked in (compile.jitPolicy / --compile-jit-policy) and call setJITPolicy(1) once interactive.
@param scale
a finite number >= 1