Skip to content

Instantly share code, notes, and snippets.

@justjavac
justjavac / GetOptimizationStatus.md
Last active May 15, 2024 05:24
V8 %GetOptimizationStatus

%GetOptimizationStatus return a set of bitwise flags instead of a single value, to access the value, you need to take the binary representation of the returned value. Now, for example, if 65 is returned, the binary representation is the following:

(65).toString(2).padStart(12, '0');
// 000001000001

Each binary digit acts as a boolean with the following meaning: