Replies: 2 comments 3 replies
-
do you also have some comparisons for execution speed? |
Beta Was this translation helpful? Give feedback.
-
Thank you for sharing this. It should be a pretty big file if As I understand you used GCC with I experimented with small C files (w/o headers) and I found that GCC startup time is about 10 times more than I think that library files should be compiled once, not every time (desirably even in VM/JIT build time). For Saying that I understand attractiveness to have a very fast C compiler as Unfortunately,
Thanks again for sharing this info. I really appreciate it. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have tried to use MIR as Java JIT. I started with a lazy approach using the C frontend: Java bytecode -> C -> c2mir
As expected, I first tried a simple HelloWorld. Note that a simple HelloWorld requires a lot of classes in Java, so this is not such a trivial test.
Results on a Core i5 5300U
Java to C conversion time is ~2s. A big C file is generated instead of one C file per class to avoid parsing the same headers again.
Measurements below are times to build executable code from the C code:
It's the same bulk compilation speed ratio than in your last article.
To speedup things, a simple solution could be to precompile standard library classes but it doesn't solve the issue for big user codes.
So currently it seems the only solution to get acceptable startup time is probably to emit MIR binary code.
Beta Was this translation helpful? Give feedback.
All reactions