You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running benchmark between Nashorn and Graal. But I see that Nashorn is performing extremely better of the order of 40x w.r.t execution of javascript function. Can anybody explain me the same?
Is there a way to parallelize the execution without synchronizing in graal? I want to compile just once and execute many times like in my nashorn code. Is it possible to do that parallely in graal?
You need to create a context with an explicit engine. This enables source caching between multiple contexts. A context for JavaScript can only be used from one thread at a time, but if you create a context for each thread with the same engine then your code will be shared and compiled only once.
Thanks for the response. I tried out your suggestion and did a benchmark. But I do not see considerable performance differences between caching and not caching. What happens when we enable source caching? Is the whole AST shared? If so, why the performance in both cases are so similar. Here is the gist for reference. This is the source I used. Let me know if I am missing something.
Also would be really great if I can share any value across contexts. Is that in the roadmap?
I am running benchmark between Nashorn and Graal. But I see that Nashorn is performing extremely better of the order of 40x w.r.t execution of javascript function. Can anybody explain me the same?
Have attached the benchmark file and the code file
Multithread Function Benchmark.txt
.
FunctionBenchmark.txt
The text was updated successfully, but these errors were encountered: