Python vs Java: Which Is More Used, What TechEmpower Can Tell You About Speed, and When a Rewrite Pays

Python leads on popularity and Java leads on live server-side websites, and the newest TechEmpower benchmark is Round 23, published on 24 February 2025, so any headline multiple for Java’s speed over Python’s has to be read with that date in mind. The suite’s GitHub repository was archived and made read-only on 24 March 2026. On the TIOBE index of 13 November 2026, Python is first at 20.86% and Java third at 8.89%, while W3Techs reports Java on 5.5% of sites with a known server-side language and Python on 1.2%. Speed is therefore a break-even you compute on your own service, set out below after the popularity figures and a guide to what TechEmpower’s tests count. In short: Python for learning, AI-adjacent products and quick MVPs; Java 25 LTS for throughput-bound services and existing JVM estates; and no rewrite until a measured ratio beats the price ratio.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

Python leads TIOBE 20.86% to 8.89%; Java leads live server-side sites 5.5% to 1.2%

These figures answer different questions because each divides by a different total. TIOBE rates languages within its own index, where C is second at 11.48%. W3Techs divides by websites whose server-side language is known, so sites with an unknown language fall outside its denominator. The Stack Overflow 2025 survey divides by respondents: over 49,000 responses from 177 countries.

MeasureDatePythonJavaLeader’s multipleWhat the percentage is of
TIOBE rating13 November 202620.86% (first)8.89% (third)Python 2.35xRatings in TIOBE’s index
TIOBE rating, derivedNovember 202523.37%8.55%Python 2.73xThe same index one year earlier
W3Techs server-side language13 November 20261.2%5.5%Java 4.58xWebsites with a known server-side language

Between November 2025 and November 2026 TIOBE’s table shows Python’s rating down 2.51 points, Java’s up 0.34 (moving it from fourth place to third) and C’s up 1.80. Because each change is measured against November 2025, the earlier ratings follow by subtraction: Python 23.37% and Java 8.55%. Those two values are derived, not read from an archived table. The gap between the languages narrowed from 14.82 to 11.97 points, and Python’s rating as a multiple of Java’s fell from 2.73x to 2.35x. The lead is large and has narrowed over the year.

Java is not shrinking on this index: its rating rose and its rank improved.

W3Techs’ 4.58x in Java’s favour (5.5% divided by 1.2%) counts public websites, so it is the figure to consult for who runs web back ends in production. It says nothing about learners or AI work, and it is a reading of what is live on 13 November 2026, not of what teams are starting now. For hiring and learning decisions, weigh TIOBE’s rating and the survey evidence further down instead.

A TechEmpower figure compares frameworks, and the newest round is Round 23 from 24 February 2025

TechEmpower’s benchmarks page lists Round 22 on 17 October 2023 and Round 23 on 24 February 2025, which is more than 20 months before 13 November 2026. Its results view, checked on 13 November 2026, displays “No benchmark data available” and “The application was unable to process the benchmark data for display”, so no framework figures are quoted here. The repository behind the suite, with about 8.1k stars and 2.0k forks, was archived by its owner on 24 March 2026 and is read-only.

Any headline claiming a speed multiple for Java still has to be read against how the suite is built:

  • It compares frameworks, not languages. The project says it includes frameworks in many languages, among them Python and Java, so a result belongs to Spring or FastAPI as configured, not to the language alone.
  • It has seven test types: JSON serialization, single query, multiple queries, cached queries, Fortunes, data updates and plaintext. Its tests exercise plaintext responses, JSON serialization, ORM database reads and writes, collections, sorting, server-side templates and XSS counter-measures.
  • The multiple-queries test runs 1, 5, 10, 15 and 20 queries per request, all at 256 concurrency, per TechEmpower’s blog. Fortunes fetches all rows through the framework’s ORM, inserts an extra message at runtime, sorts by message text and renders a server-side HTML template, per the Round 16 preview.
  • Implementations are classed as realistic (most out-of-the-box functionality enabled) or stripped (unnecessary features removed). A Python entry and a Java entry are comparable only within the same class.

The same Round 16 preview carries a warning aimed at preliminary data: “If you are not a participant in this project, we strongly advise that you do not make decisions based on what you see here.” It applies with more force to a leaderboard position quoted without its test, class and round.

Where the database takes over: turning a throughput gap into a bill

Any speed ratio, from TechEmpower, a vendor or your own load test, reaches your invoice through instance count. Instances needed equal peak requests per second divided by (requests per second one instance sustains times target utilisation), and monthly cost is instances times the price per instance. Java is cheaper to run only when its per-instance throughput ratio over Python exceeds the ratio of the two instance prices, with any larger instance size that a language’s memory use forces counted in the price. These worked cases use hypothetical inputs to show the mechanics, not measurements:

  • Java sustains 3 times Python’s requests per second per instance, on an instance priced 2 times higher: the Python fleet costs 1.5 times the Java fleet (3 divided by 2).
  • Java sustains 1.5 times Python’s throughput on the same 2 times price: the Java fleet costs 1.33 times the Python fleet (2 divided by 1.5).
  • When the two ratios are equal, neither fleet saves anything.

A raw speed ratio also reaches the fleet only in proportion to the share of each request spent in code the language runs, such as framework, serialization and templates. If that code is s times faster and takes a share f of request time, the whole request is 1 divided by ((1 minus f) plus f divided by s) times faster. With s at 10 times, f of 0.3 gives 1.37 and f of 0.9 gives 5.26. A service whose requests spend 70% of their time waiting on a database sees a 10 times faster language as 1.37 times faster, and Java would pay only if its instance costs less than 1.37 times Python’s.

This is why TechEmpower’s tests should be read one at a time. JSON serialization and plaintext involve no database work, so f is high there. The multiple-queries test, with up to 20 queries per request, lowers f by design. To fill in your own inputs, load-test the same endpoint on both stacks, record requests per second per instance at your latency target, and take instance prices from your cloud provider’s price list; our cloud market share comparison covers how the providers rank.

For that load test, here is the smallest JSON route in each framework: the same endpoint, which returns the path parameter as a JSON object. Start from these, add your real handler logic and database calls, and measure both under the same load.

from fastapi import FastAPI

app = FastAPI()

@app.get("/users/{user_id}")
async def get_user(user_id: int):
    return {"user_id": user_id}
package com.example.demo;

import java.util.Map;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.*;

@SpringBootApplication
@RestController
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

    @GetMapping("/users/{id}")
    public Map<String, Integer> getUser(@PathVariable("id") int id) {
        return Map.of("user_id", id);
    }
}

Round 23 predates Java 25 and Python 3.14’s supported free-threaded build

Round 23 was published on 24 February 2025, before Java 25 LTS (16 September 2025) and Python 3.14 (7 October 2025) were released, so it cannot reflect either. Python added a free-threaded build as an experimental opt-in in 3.13. Python 3.14 finished the PEP 703 implementation, and its what’s new page states that free-threaded Python is officially supported. Check each C-extension dependency before switching a service to it. Oracle’s Java SE support roadmap sets the Java side.

Python has moved on since then too. The python.org versions page, checked on 13 November 2026, lists Python 3.15.0 released on 9 October 2026 and 3.15.2 on 25 October 2026 as the newest release. Python 3.16.0a1, an early developer preview, arrived on 13 October 2026, and the 3.16.0a1 release page says the final release is planned for 5 October 2027.

RuntimeReleasedWhat matters for this choice
Python 3.13October 2024Free-threaded build available as an experimental opt-in
Python 3.147 October 2025Free-threaded build officially supported
Python 3.159 October 20263.15.2 released 25 October 2026 is the newest release on python.org’s versions page
Python 3.163.16.0a1 on 13 October 2026Early developer preview; final release planned for 5 October 2027
Java 2516 September 2025Long-term support release
Java 2617 March 2026Non-LTS; support to September 2026
Java 2715 September 2026Non-LTS; supported until March 2027

For production Java, Java 25 LTS is the default unless you can upgrade every six months. Python free threading against Rust concurrency is covered in our Python vs Rust comparison.

Where the growth is: Python and FastAPI in the 2025 survey

The Stack Overflow 2025 survey covered 314 technologies. On its technology results page, Python adoption rose 7 percentage points from 2024 to 2025, which the survey attributes to its role in AI, data science and back-end development. FastAPI rose 5 points, which Stack Overflow reads as a trend toward using Python for performant APIs. That is the Python stack that would sit against Spring in a framework benchmark.

In its press release, PostgreSQL ranks highest among databases for developers who want to use it next year (47%) or keep using it (66%), for the third year running, so the data layer is a separate decision from the language.

Java’s evidence in this set is the installed base: the W3Techs 5.5% and TIOBE’s rise to third place.

Picking by workload, and the rule for rewriting

NeedPickEvidence it rests onWhat flips it
First language, or AI-adjacent productPythonPython up 7 points in the 2025 survey, first on TIOBEYour target employer or team runs on the JVM
Database-bound internal APIEitherA high database share shrinks any language gap (1.37x in the worked case)Your measured ratio beats your price ratio
Throughput- or latency-bound API at scaleJava 25 LTS if your load test clears the break-evenThe break-even rule; no speed figure is published here, so measure firstMeasured throughput ratio falls below the instance-price ratio
Existing JVM estateStay on Java 25 LTSOracle’s roadmap datesA service passes the break-even and the team can staff Python
Existing Python estateStay and tune in placeThe break-even ruleA service passes the break-even and the team can staff Java
Small team shipping an MVPPythonFastAPI up 5 points in the 2025 surveyA load test shows instance count dominating the bill
Long support horizonJava 25 LTSJava 26 and 27 are non-LTS with six-month windowsYou can upgrade every six months

C#, Kotlin and Rust are the usual third options; the Python vs Rust comparison linked above covers Rust. Rewrite a service only when the throughput ratio you measure on that service, after allowing for the database share, beats the instance-price ratio and your team can staff the other language. Otherwise tune it in place.

Elias Virtanen

Elias Virtanen

Games and consoles

Elias Virtanen covers games and consoles for Tech Insider: console and handheld hardware, game releases, emulators and the business of the games industry. His comparisons start from the makers' specifications and published independent results, and he says plainly what the evidence supports.

View all articles