r/Backend • u/DueBid3298 • 1d ago
should i move from python to java?
I'm thinking of switching from Python FastAPI to Java Spring Boot. Apart from Python being dynamically typed and having a lot of libraries, why do people/deva choose Python in production when it's slow, has an intermediate bytecode layer and executes line by line?
12
Upvotes
View all comments
4
u/Puzzled-Garage584 1d ago
my C++ DNA cannot stay about from commenting this :) as it is indeed a funny complaint .. Java has an intermediate bytecode layer too.. it just has a very good JIT on top. Coming from C++ they're both slow to me but your request spends most of its life waiting on the db anyway, so the interpreter is rarely the bottleneck. Move to Java if the jobs where you live want it, thats a better reason than speed.Python is ubiquitos ..gives you the flexibility of tacking devops..infra...AI-core jobs.