-
Notifications
You must be signed in to change notification settings - Fork 339
Open
Labels
optimizationAn performance optimization issue.An performance optimization issue.researchResearch intense work item.Research intense work item.
Description
Currently Slot is a thin-wrapper around a u16 value representing indices into a functions stack slots.
During execution Wasmi has to multiply those stack slot indices with 8 to get the byte offset.
This usually isn't a big deal on most platforms as machine instructions such as lea provide multiplies of power-of-tows out of the box (up to a limit).
This will also necessitate having u32 indices for Slots since otherwise their index values will likely go out of range for common Wasm functions.
However, there might still be the case that I-cache pressure will drop due to the following reasons:
u16values have to be zero-extended on most platforms before being used.- Dropping the multiply-by-8 might actually give room to an improved instruction selection.
- Some micro architectures (e.g. embedded devices) might not have the same capabilities such as modern x86 or ARM and thus might see considerably better performance.
This issue tracks progress of this potential optimization.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
optimizationAn performance optimization issue.An performance optimization issue.researchResearch intense work item.Research intense work item.
Type
Projects
Status
Open