Skip to content

Performance issue related to floating-point (FP) arithmetic #7731

@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 Wasmtime compared with three 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:

  • Wasmtime: 3057ms
  • Wasmer: 920ms
  • WasmEdge (AOT): 759ms
  • WAMR (AOT): 754ms

Emscripten

Wasm Runtime Version

  • Wasmtime: cli 15.0.0
  • Wasmer: 4.2.3
  • WasmEdge (AOT): 0.13.5
  • WAMR (AOT): 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 of floating-point (FP) arithmetic. The inserted code snippet is on line 946-1039 of the source program. We found that this abnormal performance would not occur when running the seed program alone. So, we believe that this anomaly may be caused by some improper handling of FP arithmetic. Could you please check this situation? Thank you!

1702437936230.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions