Closed MartyIX closed 6 years ago
hi, @MartyIX, evaluating a script for the first time is going to take some time. It needs to load the script, load the language standard library, evaluate all that and so on. It does quite a bit of work there, so I think it's normal that it takes some time. If you eval different scripts in the same context it should be faster. Executing the scripts will eventually allow the JIT compiler compile the code efficiently.
Also, can you please elaborate what you mean by the bottleneck?
@shelajev I see.
Also, can you please elaborate what you mean by the bottleneck?
Well, the bottleneck is the fact that it compiles too much every time I run the program. And 12 seconds is quite a lot for me. I would like to get rid of this overhead. Can compilation to native code help me here?
Originally, we had a python script to generate charts for us. However, I wasn't happy about having multiple programming languages in our project as it complicates many things, so we rewrote the plotting script to Java. Then I have encountered news about Graal and I was happy, that I'll have only Java code with R script to generate plots. But I need it to be quick. So that's what I'm solving right now to make the picture complete. :-) Anyway, I don't want to complain, it's just I don't know too much about inner workings of Graal.
Hi,
I have modified
com.oracle.truffle.r.fastrjavaui.FastRJavaCmd
to generate very simple chart and to print epoch milliseconds after every step it takes:The output on my compute is:
What might be the performance bottleneck?
Environment:
uname -a
:Linux marty-GB-BXi7-5500 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Regards, Martin