fizzy icon indicating copy to clipboard operation
fizzy copied to clipboard

Benchmarks framework for individual opcodes

Open chfast opened this issue 4 years ago • 0 comments

For fizzy-bench-internal create a generator that generates wasm code focusing on a selected instruction. For binary instructions it may use accumulation procedure. Fixed size array is provided as imported memory. The code may look like:

    (memory (import "" "m") 1 1)
    (func (result f32)
      (f32.load offset=0 (i32.const 0))

      (f32.load offset=4 (i32.const 0))
      (f32.add)
      (f32.load offset=8 (i32.const 0))
      (f32.add)
      (f32.load offset=12 (i32.const 0))
      (f32.add)
      (f32.load offset=16 (i32.const 0))
      (f32.add)
      ...
      (f32.load offset=N*4 (i32.const 0))
      (f32.add)
    )

Also generate a "baseline" benchmark case where the binary instruction is replaced with drop.

Design and implement a generator to unary instructions.

chfast avatar Sep 21 '20 07:09 chfast