Skip to content

Performance issue related to operations on floating-point (FP) arrays #4378

Open
@ShuyaoJiang

Description

@ShuyaoJiang

Summary

Hi, I ran the attached case (C program, compiled to Wasm by Emscripten) in different Wasm runtimes, and found abnormal performance in Wasmer compared with other runtimes. The execution time of this case (time interval from the start to the end of the execution of Wasm bytecode running command) on different runtimes is as follows:

  • Wasmer: 981ms
  • Wasmtime: 28ms
  • WasmEdge (AOT): 14ms
  • WAMR (AOT): 10ms

Emscripten

  • emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.49 (04a0cad4d4c9f5d62876821274d78cd0a52427af)
    clang version 18.0.0 (https://github.com/llvm/llvm-project 269685545e439ad050b67740533c59f965cae955)
    Target: wasm32-unknown-emscripten
    Thread model: posix

Wasm Runtime Version

  • Wasmer: 4.2.3
  • Wasmtime: cli 15.0.0
  • WasmEdge: 0.13.5
  • WAMR: 1.2.3

Hardware & OS

  • CPU: Intel(R) Xeon(R) E5-2686 v4 CPU @ 2.30GHz
  • Memory: 16GB
  • OS: Ubuntu 20.04.6 LTS

Additional details

The attached source program is synthesized by a Csmith seed and a code snippet from another program. The inserted code snippet is on lines 67-68 of the source program, which is an operation on floating-point (FP) arrays (the code snippet is attached below). So, we think that this abnormal performance may be caused by some improper handling of this operation. Could you please check this situation? Thank you!

for (print_hash_value = 0; print_hash_value < 1; print_hash_value++)
        float2_temp_3[print_hash_value] = 0x5.Ep+1;

1702343309202.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions