Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark: add some micro benchmarks #133

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

kylo5aby
Copy link
Contributor

@kylo5aby kylo5aby commented Dec 27, 2023

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'    │
└─────────┴────────────────────────────────────┴──────────────────┴─────────────┴─────────────┴──────────────────────┴──────────────┘


export function main() {
for (let i = 0, j = 0; i < 1e7; i++, j++) {
arr[j] = i;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test to use i32 type as the index type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the result

@kylo5aby kylo5aby force-pushed the benchmark/micro-benchmark branch from b062bea to 67e6fb4 Compare January 4, 2024 03:38
Copy link
Contributor

@xujuntwt95329 xujuntwt95329 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xujuntwt95329 xujuntwt95329 merged commit 6ba5ed6 into web-devkits:main Jan 5, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants