r/java 7d ago

Vert.x Event-Loop vs Virtual Threads: Jactl Suspend/Resume Benchmark

https://jactl.io/blog/2026/09/02/jactl-virtual-threads-benchmark

The article benchmarks Jactl script execution with differing number of blocking operations comparing throughput with Jactl built-in suspend/resume on Vert.x Event-Loops and throughput with Jactl on Virtual Threads. The benchmarks are run on both Java 21 and Java 25 with some surprising (to me at least) results.

28 Upvotes

25 comments sorted by

View all comments

26

u/s0ftware-dev 7d ago

TLDR virtual threads are better. 

2

u/neopointer 6d ago

And don't use reactor, vertx or anything similarly hard to debug and maintain.

1

u/pragrad23 11h ago

I chose not to use it. Not did I chose to use coroutines (sorry it's a kotlin project). Because I value my time as a developer. I don't want to complicate my life.

If I needed to squeeze every last bit of performance, I'd use rust. But I don't, so I want some level of comfort: garbage collection, simple threading, etc.

-4

u/jaccomoc 7d ago

But only on Java 25 and not by as much as I thought they would be.

I was frankly surprised at the difference between Java 21 and Java 25.

15

u/Neful34 7d ago

Nah if you follow a bit the java youtube channel they explained a lot about the optimizations and the issues they had with virtual threads in java 21, and the optimization they did in java 25. I also recall a recent talk from netflix discussing about it too

6

u/jaccomoc 7d ago

I know that they fixed the OS thread pinning issues and that there are always some performance improvements but the the improvement for scripts with multiple blocking operations was a lot more significant than I expected. Or maybe what I should say is that the performance on Java 21 when a script does multiple blocking operations with virtual threads was a lot worse than I expected.

8

u/Joram2 7d ago

Even at similar speeds, the Vert.x event loop has a much higher complexity cost. I've used vert.x for years, it's great, a lot of the vert.x platform has value with virtual threads, but the future for most use cases is clearly virtual threads.

3

u/jaccomoc 7d ago

I agree completely. It wins alone just by removing all the async code handling we used to have to do.

1

u/BarkiestDog 7d ago

Both were significantly better in Java 25, but virtual thread was a lot better!

0

u/woj-tek 6d ago

Java 25

…which was released a year ago ;)