Skip to content

bytecode: Do not generate `SLIDE x 0` instructions

Matthew Pickering requested to merge wip/slide_x_0 into master

SLIDE x 0 is a no-op as it means to shift x elements of the stack by no spaces. In the interpreter, this results in a loop which copies an array element into the same place.

I have instrumented GHCi to count how many of these instructions are interpreted. The workload was ghc compiling two simple modules.

Total no-op slides: 7,793,476 Total slides: 11,413,289 Percentage useless (slides): 68% Percentage useless of total instructions: 9%

Merge request reports

Loading