-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
Add clearscript to benchmarks #1775
base: main
Are you sure you want to change the base?
Conversation
This is a bit apples to oranges comparison as interpreters vs truly compiled and inter-process vs invokes... |
@lahma what does it "inter-process" mean here? I think it's good to represent compiled engines too, but maybe it should be an opportunity to call out the differences and introduce other benchmarks that will show the pros and cons. For instance the Allocated column is only for managed memory, and compilation-based engines use mostly native memory so this won't show up. The other thing could be to add a benchmark where a script is used once, or with a way that scripts are re-compiled or re-parsed on each call. Some application behave this way but running a script just once. The last thing to take into account is how scripts are disposed, for instance you keep compiling/parsing new scripts, would it lead to resource exhaustions? Or can we release the script resources automatically (in-memory assemblies, loaded code, ...)? So maybe it's about splitting this whole table and explaining what the test is about and why different engines do better than others, with the extra ones. I'd also hope that would make the Jint/Jint_Parsed duplication not necessary. |
yes, the table also shows that some tests are bad on clearscript and I assume it's because of the context switching between native V8 and dotnet. this is our main use case. so we've a lot esm scripts which are also calling into dotnet a lot. so I think it's worth trying to switch to jint, or at least try it. |
Just meant no interop between NET runtime and native code. It's the interop bridge which costs. For V8 it might make sense to create a separate benchmark altogether comparing just it and Jint and keep V8 out from "interpreter" comparison. Benchmark could include something like.
|
There's also https://github.com/Taritsyn/JavaScriptEngineSwitcher if one wants to write their business code against abstraction and have possibility to change underlying engine later one (or on use case basic). |
Sounds good, will look into it later
To limmited for our use cases 🙃 |
WDYT about adding
ClearScript V8
to benchmark comparision?Jint is pretty fast and i think it will be faster when massive interop is used (our usecase).
I know ClearScript will be faster if we cache the compiled scripts.
Benchmarks with issues:
EngineComparisonBenchmark.YantraJS: DefaultJob [FileName=evaluation]