Structs like JSFunctionDef have a ton of booleans and there can be a ton of JSFunctionDefs.
It was recently brought to our attention that, at least on powerpc, sizeof(bool) == 4, so there's probably a lot of unused space that can be reclaimed by switching from plain bool field to bool field : 1.
As an example: my rough estimate is that, with bool bitfields and some field reordering, we can shave 80 bytes off JSFunctionDef on powerpc and other platforms where sizeof(bool) > sizeof(char).
Structs like JSFunctionDef have a ton of booleans and there can be a ton of JSFunctionDefs.
It was recently brought to our attention that, at least on powerpc,
sizeof(bool) == 4, so there's probably a lot of unused space that can be reclaimed by switching from plainbool fieldtobool field : 1.As an example: my rough estimate is that, with bool bitfields and some field reordering, we can shave 80 bytes off JSFunctionDef on powerpc and other platforms where
sizeof(bool) > sizeof(char).