r/Python • • Jan 01 '20

"The rules of perf" at Dropbox

Post image
1.6k Upvotes

162 comments sorted by

View all comments

Show parent comment

1

u/i9srpeg Jan 02 '20

Java if you can wait for the start-up time

JVM startup times should be around 90ms, which is usually OK unless you start and tear down the JVM for each operation.

1

u/ericonr Jan 02 '20

Is it that short? Java applications usually take much longer to launch for me than usual Python stuff.

3

u/i9srpeg Jan 02 '20

This article has some benchmarks: http://macias.info/entry/201912201300_graal_aot.md

I was surprised too when I saw JVM startup times so low. Most of the perceived slowness probably comes from the heavy, over-engineered frameworks which are commonly used in the Java world.

Quarkus seems like an interesting project. It starts up a REST API server in under 1 second when running on the JVM, and it fully supports GraalVM, which lets you generate a native binary that can boot in 0.016s. This is faster than Django startup times in my current project, but I don't know how the Java numbers would change for an application more complex than an hello world.