Closed rayduan closed 1 year ago
Hi @rayduan, which version are you using? Can you try the latest snapshot build? I ran your example using the snapshot on my machine and it was much better:
cost:358
cost:369
cost:386
cost:388
cost:318
cost:400
cost:362
cost:430
cost:401
cost:393
cost:3711
i'm use mac m1, graalvm jdk 11, and my sdk version is 22.3.1, i'm sure to init Context cost too many time ,but in multi-threading i can't reuse context
also it's any way to sovle reuse Context bindings in multi-threading ? if i can resue context it work well ,but i need bindings diff params in every eval, i need your help please
You can create a context per-thread and put it into a thread local variable.
i'm use mac m1
Did you download the macOS (aarch64)
build of GraalVM? Don't use the macOS (amd64)
build, that one is for Intel CPUs, it would work on the M1, but it would be slow.
您可以为每个线程创建一个上下文并将其放入线程局部变量中。
我用的是mac m1
您是否下载了
macOS (aarch64)
GraalVM 的构建版本?不要使用macOS (amd64)
该版本,它适用于 Intel CPU,它可以在 M1 上运行,但速度会很慢。
yes,i'm use amd64,i'll try to change it
yes,it work well,thank you very much
hi,i want to implement java application invoke python script witih graalpython,but it cost too long, sigle eval cost 22256 ms here is my test code
here is cost![image](https://user-images.githubusercontent.com/21018866/227417504-809467c3-755a-4958-a0b0-ce94c9645543.png)
please tell me how to improve it