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

Make the Benchmark button look more like a button #2

Open
juanmendes opened this issue Sep 25, 2023 · 3 comments
Open

Make the Benchmark button look more like a button #2

juanmendes opened this issue Sep 25, 2023 · 3 comments

Comments

@juanmendes
Copy link

juanmendes commented Sep 25, 2023

I think the Benchmark button is not intuitive enough. I often need to think a few times before realizing it's a button. I use it at https://stackoverflow.com/questions/51185/are-javascript-strings-immutable-do-i-need-a-string-builder-in-javascript/4717855#4717855

Two (not well-though-out) suggestions:

  • Making it have a border and be more 3D looking like a standard button.
  • Having a run ▶️ icon
    ▶️ Benchmark
@silentmantra
Copy link
Owner

fixed, plus there's a new feature - groups, i've updated your stackoverflow answer (so you can see how that could be done) and benchmark results. you can benchmark for safari, run 5 times for the best result. so you can now remove your screenshots, use markdown copy the next times, thanks

@juanmendes
Copy link
Author

fixed, plus there's a new feature - groups, i've updated your stackoverflow answer (so you can see how that could be done) and benchmark results. you can benchmark for safari, run 5 times for the best result. so you can now remove your screenshots, use markdown copy the next times, thanks

Will update the answer with the copied markdown!

@silentmantra
Copy link
Owner

silentmantra commented Sep 30, 2023

@juanmendes added auto estimation of cycles and number of times to run benchmarks, updated your answer. if you don't set the cycles they are calculated automatically for each solution, looks cool.
btw Firefox get worse with the new update:

Cycles: 50000 / Firefox/117
---------------------------------------------------------------
Same string 'Hot diggity dizzle'
    string concatenation   1.0x  |  176   180   187   198   203
    array push & join      5.2x  |  911  1082  1143  1147  1159
Random strings
    string concatenation   1.0x  |  172  174  183  208  214
    array push & join      3.5x  |  609  681  688  692  716
Firefox/118
--------------------------------------------------------------------
Same string 'Hot diggity dizzle'
    string concatenation   1.0x  |  x100000  304  335  353  358  370
    array push & join      9.5x  |   x10000  289  300  301  306  309
Random strings
    string concatenation   1.0x  |  x100000  334  337  345  349  377
    array push & join      5.1x  |   x10000  169  176  176  176  180

Tested Chrome 117 with auto estimation of cycles = the same results, so seems the estimation works ok

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

No branches or pull requests

2 participants