web-devkits / Wasmnizer-ts

Toolchain for compiling TypeScript to WasmGC
Apache License 2.0
292 stars 23 forks source link

benchmark: add some micro benchmarks #133

Closed kylo5aby closed 6 months ago

kylo5aby commented 6 months ago

Result

┌─────────┬────────────────────────────────────┬──────────────────┬─────────────┬─────────────┬──────────────────────┬──────────────┐
│ (index) │             benchmark              │ WAMR_interpreter │  WAMR_aot   │   QuickJS   │ WAMR_interpreter/qjs │ WAMR_aot/qjs │
├─────────┼────────────────────────────────────┼──────────────────┼─────────────┼─────────────┼──────────────────────┼──────────────┤
│    0    │      'any_basic_type_access'       │   '3401.92ms'    │ '3417.58ms' │  '50.45ms'  │       '67.43'        │   '67.74'    │
│    1    │     'any_complex_type_access'      │   '5946.48ms'    │ '5741.60ms' │  '44.36ms'  │       '134.04'       │   '129.42'   │
│    2    │           'array_access'           │    '251.65ms'    │  '28.26ms'  │ '597.41ms'  │        '0.42'        │    '0.05'    │
│    3    │           'array_access_i32'       │    '242.89ms'    │  '23.39ms'  │ '596.01ms'  │        '0.41'        │    '0.04'    │
│    4    │        'binarytrees_class'         │    '489.55ms'    │ '174.99ms'  │ '611.72ms'  │        '0.80'        │    '0.29'    │
│    5    │      'binarytrees_interface'       │   '2596.63ms'    │ '639.33ms'  │ '375.05ms'  │        '6.92'        │    '1.70'    │
│    6    │           'class_access'           │    '581.39ms'    │  '84.79ms'  │ '1098.15ms' │        '0.53'        │    '0.08'    │
│    7    │         'class_allocation'         │    '643.04ms'    │ '422.03ms'  │ '1323.41ms' │        '0.49'        │    '0.32'    │
│    8    │            'fibonacci'             │    '599.02ms'    │ '200.67ms'  │ '690.84ms'  │        '0.87'        │    '0.29'    │
│    9    │ 'interface_access_field_fastpath'  │    '46.81ms'     │  '7.45ms'   │  '51.79ms'  │        '0.90'        │    '0.14'    │
│   10    │ 'interface_access_field_slowpath'  │   '1230.48ms'    │ '218.20ms'  │  '52.68ms'  │       '23.36'        │    '4.14'    │
│   11    │ 'interface_access_method_fastpath' │    '62.83ms'     │  '13.03ms'  │  '77.56ms'  │        '0.81'        │    '0.17'    │
│   12    │ 'interface_access_method_slowpath' │   '2118.00ms'    │ '374.36ms'  │  '77.55ms'  │       '27.31'        │    '4.83'    │
│   13    │            'mandelbrot'            │   '2084.30ms'    │ '469.65ms'  │ '6942.72ms' │        '0.30'        │    '0.07'    │
│   14    │           'nbody_class'            │   '1386.56ms'    │  '81.99ms'  │ '2511.07ms' │        '0.55'        │    '0.03'    │
│   15    │         'nbody_interface'          │   '5230.56ms'    │ '835.89ms'  │ '2530.79ms' │        '2.07'        │    '0.33'    │
│   16    │            'quicksort'             │    '84.04ms'     │  '38.39ms'  │  '77.60ms'  │        '1.08'        │    '0.49'    │
│   17    │         'quicksort_float'          │    '86.63ms'     │  '38.27ms'  │  '96.90ms'  │        '0.89'        │    '0.39'    │
│   18    │          'spectral_norm'           │   '4990.44ms'    │ '344.34ms'  │ '9766.48ms' │        '0.51'        │    '0.04'    │
└─────────┴────────────────────────────────────┴──────────────────┴─────────────┴─────────────┴──────────────────────┴──────────────┘