Skip to content

Commit

Permalink
FIXES bytecodealliance#137: make calling wasm from python 7x faster
Browse files Browse the repository at this point in the history
  • Loading branch information
muayyad-alsadi committed Apr 4, 2023
1 parent 1ca73e9 commit e6c054b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/gcd_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import time
from math import gcd as math_gcd
from gcd import gcd_func as wasm_gcd
from gcd_alt import gcd as wasm_gcd_alt


def python_gcd(x, y):
while y:
Expand All @@ -13,7 +11,7 @@ def python_gcd(x, y):

N = 1_000
by_name = locals()
for name in "math_gcd", "python_gcd", "wasm_gcd", "wasm_gcd_alt":
for name in "math_gcd", "python_gcd", "wasm_gcd":
gcdf = by_name[name]
start_time = time.perf_counter()
for _ in range(N):
Expand Down

0 comments on commit e6c054b

Please sign in to comment.