Repository navigation
Replies: 17 comments
|
I will list here those piece of code that are "slower" on the measurement against something else, and are present in Acode code. See if there is a case for potential performance improvement:
https://www.measurethat.net/Benchmarks/Show/35928/1/arrayfind-vs-mapget-on-100-items
|
|
Object.fromEntries+map vs reduce (reuse object) https://www.measurethat.net/Benchmarks/Show/35911/1/objectfromentriesmap-vs-reduce
=== To be fair I also found this, ponder with wisdom: Other related: https://www.measurethat.net/Benchmarks/Show/35742/1/objectfromentries-vs-classic-for-fixed-objectfromentrie |
|
Get from object vs get from map https://www.measurethat.net/Benchmarks/Show/32762/1/get-from-object-vs-get-from-map
|
|
spread vs slice vs splice https://www.measurethat.net/Benchmarks/Show/4707/0/spread-vs-slice-vs-splice
Acode Matches (supposedly spread-type, idk check it out): There are more regarding spread and splice, or tospliced, unshifted etc etc. However ewcb of them wins over Spread method. Worth to check out |
|
Assign vs Manual Assignment https://www.measurethat.net/Benchmarks/Show/35886/1/assign-vs-manual-assignment
[[[Acode matches: 21 results, 7 files.]]] Benchmark seems absurd, so here another more practical maybe https://www.measurethat.net/Benchmarks/Show/30958/0/assign-vs-direct
Other related: https://www.measurethat.net/Benchmarks/Show/30959/0/assign-vs-direct-2 Other related: https://www.measurethat.net/Benchmarks/Show/35825/1/objectassign-vs-conditionals |
|
array.from vs slice.call https://www.measurethat.net/Benchmarks/Show/35861/1/arrayfrom-vs-slicecall
|
|
There is this which is too complicated for me, check it out https://www.measurethat.net/Benchmarks/Show/35858/1/arrayfromiterable-vs-iterable |
|
date.now vs performance.now https://www.measurethat.net/Benchmarks/Show/35847/1/date-vs-perf
|
|
https://www.measurethat.net/Benchmarks/Show/35845/1/date-tostring-vs-template
=== In alternative there is concatenation
|
|
Javascript multi element splice vs assign https://www.measurethat.net/Benchmarks/Show/35817/1/javascript-multi-element-splice-vs-assign
There are 35 "splice" in the app code. Not sure if they fit the case tho, someone competent should check it out. |
|
padStart vs splice vs loop https://www.measurethat.net/Benchmarks/Show/21122/0/padstart-vs-splice-vs-loop
|
|
map.has vs map.get https://www.measurethat.net/Benchmarks/Show/23049/0/map-get-vs-map-has
[[[Acode matches: 6 results, 4 files]]] |
|
Trucation methods (I dont really know if acode has any..., check it out) https://www.measurethat.net/Benchmarks/Show/35768/1/truncation-methods-5
|
|
There are many others, however the simple ones indentifiable by me have run out. So if you are a dev dive in it, it fun. |





























Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Performance related since Acode is struggling on lower end devices.
I encountered a juicy website that gathers all users curious performance measurements.
Things like
ReplaceAll(string)vsreplace(regex g flag)here1, here2, here3, here4splitvsmatch(split is 8% faster) hereexecvsmatchEverything here: https://www.measurethat.net/Benchmarks
There are many very very interesting comparisons, to know which one is faster is very useful knowledge.
Now I am not personally competent to check Acode code, but some regex related were juicy, like the first two I menzioned.
Of course everything needs to be in context and measured accordingly, like Split vs Match, both have their specialities, it just so happens that in certain contexts they interwine, so one is more performant than the other.
Check it out
===
Warning, the website speed benchmarks could be unreliable if the perf difference is too small. Example:
replaceAll with regex vs replace with regex:
[jsbench.me] ↓ (much more precise and consistent)

[measurethat.net] ↓

All reactions