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

Experiment: Add benchmarking for common element types #61

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tbeseda
Copy link

@tbeseda tbeseda commented Apr 12, 2024

cd bench
npm i
node run.mjs

Current results:

┌─────────┬─────────────────────────┬─────────┬─────────┬─────────┬────────────────────┐
│ (index) │ name                    │ ops/sec │ average │ samples │ relative to simple │
├─────────┼─────────────────────────┼─────────┼─────────┼─────────┼────────────────────┤
│ 0       │ 'simple'                │ 248079  │ '0.004' │ 24808   │ ''                 │
│ 1       │ 'slot'                  │ 173084  │ '0.006' │ 17309   │ '1.43 x slower'    │
│ 2       │ 'nested'                │ 168844  │ '0.006' │ 16885   │ '1.47 x slower'    │
│ 3       │ 'scripted'              │ 139532  │ '0.007' │ 13954   │ '1.78 x slower'    │
│ 4       │ 'styled'                │ 108824  │ '0.009' │ 10883   │ '2.28 x slower'    │
│ 5       │ 'scripted import'       │ 101346  │ '0.010' │ 10135   │ '2.45 x slower'    │
│ 6       │ 'styled host'           │ 34218   │ '0.029' │ 3422    │ '7.25 x slower'    │
│ 7       │ 'super'                 │ 31448   │ '0.032' │ 3145    │ '7.89 x slower'    │
│ 8       │ 'super++'               │ 17576   │ '0.057' │ 1758    │ '14.11 x slower'   │
│ 9       │ 'simple [100]'          │ 3428    │ '0.292' │ 343     │ '72.37 x slower'   │
│ 10      │ 'slot [100]'            │ 2095    │ '0.477' │ 210     │ '118.41 x slower'  │
│ 11      │ 'nested [100]'          │ 2076    │ '0.482' │ 208     │ '119.50 x slower'  │
│ 12      │ 'styled [100]'          │ 1834    │ '0.545' │ 184     │ '135.27 x slower'  │
│ 13      │ 'scripted [100]'        │ 1739    │ '0.575' │ 174     │ '142.66 x slower'  │
│ 14      │ 'scripted import [100]' │ 1449    │ '0.690' │ 145     │ '171.21 x slower'  │
│ 15      │ 'styled host [100]'     │ 413     │ '2.420' │ 42      │ '600.68 x slower'  │
│ 16      │ 'super [100]'           │ 385     │ '2.595' │ 39      │ '644.36 x slower'  │
│ 17      │ 'super++ [100]'         │ 193     │ '5.165' │ 20      │ '1285.38 x slower' │
└─────────┴─────────────────────────┴─────────┴─────────┴─────────┴────────────────────┘

@kristoferjoseph kristoferjoseph marked this pull request as ready for review April 16, 2024 23:44
@kristoferjoseph
Copy link
Contributor

I am unable to run the bench

How does this work?

@tbeseda
Copy link
Author

tbeseda commented Apr 17, 2024

I am unable to run the bench

How does this work?

Did you run the instructions in the PR comment or? what's the error?

edit: I had an error in my instructions! sorry about that. it's just node run.mjs

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.

None yet

2 participants