Java/JVM (HotSpot): Is there a way to save JIT performance gains at compile time?

后端 未结 4 1669
-上瘾入骨i
-上瘾入骨i 2020-12-30 08:50

When I measure the throughput of my Java application, I see a 50% performance increase over time:

  • For the first 100K messages, I get ~3,000 messages per second
4条回答
  •  南方客
    南方客 (楼主)
    2020-12-30 09:06

    You could try adapting your app to run it with Nailgun. Instead of invoking your app against a fresh JVM each time you invoke it against a Nailgun server which is a long-lived JVM. The second time you invoke your app, the nailgun JVM will have optimized the paths in your classes and should therefore execute a lot faster than it would from fresh.

提交回复
热议问题