afterburner/blackbird usage? #147
-
How are you supposed to use the afterburner and blackbird modules? Is it ok to just throw both into the project as runtime dependencies and then make sure that findAndRegisterModules() is called at runtime? Will the correct thing happen in jdk 8, 11, and 17? And graal too I guess. I don't know anything about graal. If I want to run on 8 and 17 do I need to make one use afterburner and another use blackbird or just decide to fully go with blackbird? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Wrt. registering the module, yes, you can traditionally either:
Personally I am a big fan of explicit set up (1) and prefer that to avoid accidentally registering other modules that may be on my classpath, but YMMV. However! With frameworks like Quarkus and Micronaut that do lots of heavy-lifting during build phase, auto-discovery may not work without some help: I would verify its functioning. As to JDK versions: Afterburner works well for older JDKs, but Blackbird should work better with later (and Afterburner probably won't work well at all with 17+). So for future usage, Blackbird should take over. |
Beta Was this translation helpful? Give feedback.
-
How safe to use them? And what is the benefit in terms of speed? My non-scientific tests (no JMH, with warm-up and black hole) show floating speedup factor between 0 and 10%. |
Beta Was this translation helpful? Give feedback.
No, modules are fully isolated from each other and have no knowledge of each other.
In this case either neither or both would be activated. So ideally you use only one. But coordination is outside control of modules.