Is it necessary to optimize dynamically generated java bytecode?

I created some java bytes using ASM.
Walking through some AST of some small DSL in the visitor’s template.
And I'm worried that the generated bytecode is too "simple", i.e. Without any "compile time optimization".
Although in my case this may be normal if the generated bytecode is not optimized, but I cannot help but ask: is there a need for projects that generate bytecode at run time to optimize the bytecode? I know that for jvm, most of the "optimization" work is done while the program is running, by compiling jit. Thus, bytecode optimization at compile time can be slightly affected.
But really? Is it completely pointless to optimize the bytecode for the bytecode generated on the fly? Is there anyone who can share the experience regarding the difference, mainly in performance at runtime, between bytecodes and without any optimization?

+5
source share
2 answers

I know at least one JVM-based language that still remains nameless, as slow as hell. It could use some compile-time optimization.

Javac JVM , , Javac, JVM. Javac . , , , Javac , JVM .

, Java-.

, CPU , JVM ? CPU. CPU JVM . CPU ( ). JVM , JVM , , CPU .

, , ( ) , , JVM.

+2

, .

Javac, . Hotspot JIT , - . , , , .

0

All Articles