WIP: faster JSObjectSpace (JS runtime retain / release)#676
WIP: faster JSObjectSpace (JS runtime retain / release)#676sliemeobn wants to merge 8 commits intoswiftwasm:mainfrom
Conversation
|
ok, I just ran this in the ElementaryUI performance benchmark, the results are ... let's say "subtle" |
|
|
@kateinoigakukun please advise if you still want to go ahead with the |
|
@MaxDesiatov @kateinoigakukun the version currently used here (v5) does the following
limitations:
and, just for the record: using a typed array ( |
|
unfortunately, all this micro-optimizing does not fully materialize in the brower... : / here is a comparison with the current ElementaryUI benchmark script original version: current branch version: now, why this does not slash the retain times in half in the browser I don't know yet (maybe the JS engine in there applies different optimizations)? here is me thinking maybe we should stop improving this old nonsense and "just": |
|
Do you get significantly different results with different JS engines? |
I added a tiny benchmark to measure the
JSObjectSpacein isolation and made a few changes to speed things up.results (two example runs)
I included the benchmark script (AI slop) but I can remove it if we want a clean commit.
Also, please note that there is a behavior difference: refs are not no longer "globally unique" - ie: they will be reused once freed. a "use after free" currently causes an exception - after this PR it could now theoretically go undetected.