Skip to content

.NET 10 and .NET 11: EF Core, Dapper, Plain Npgsql ​

Benchmark · November 2026 · .NET

Before you trust these numbers

  • The author of NpgsqlRest runs this benchmark, and NpgsqlRest is one of the services in it.
  • The analysis was written with AI assistance from the raw data, then reviewed and edited.
  • Every test ran once, on one machine. Treat differences of a few percent as a tie.
  • Everything is public so you can check it: the code of every service, the data, and everything that went wrong, and how to run it yourself. Corrections and pull requests are welcome.

This page is about six services, all ASP.NET Core Minimal APIs written by hand. It answers two questions:

  1. Is .NET 11 faster than .NET 10? The same code runs on both.
  2. Which way of talking to PostgreSQL should you use: EF Core, Dapper, or the plain Npgsql driver?

The answers, in short

  • .NET 11 against .NET 10: it depends on the request. Requests that return rows need about 23% less CPU on .NET 11. Very small requests are about 9% slower. Memory is the same.
  • Dapper against plain Npgsql: practically the same speed (−2%), for about half the code.
  • EF Core against plain Npgsql: about 37% fewer requests per second and 34% more memory.

What is compared ​

Runs on .NET 10Runs on .NET 11How it reads from PostgreSQLLines of C#
Plain NpgsqlcodecodeA command with parameters and a data reader, every column read by hand281
DappercodecodeQueryAsync<T>: Dapper maps the rows to objects155
EF CorecodecodeSqlQuery<T> over a DbContext116

In each row, the .NET 10 and the .NET 11 service are the same source file. For plain Npgsql and Dapper they also use the same library versions (Npgsql 11.0.0, Dapper 2.1.100), so the runtime is the only difference. The EF Core services use the EF Core of their own platform (10.0.4 and 11.0.0). All six are ordinary JIT builds with 4 CPU cores each.

Question 1: is .NET 11 faster than .NET 10? ​

Pick a test and compare. For each of the three styles, the grey bar is .NET 10 and the purple bar is .NET 11. The label on the right says, in plain words, how .NET 11 did.

Kind of test
Users at the same time
Rows in the response
Show

Requests per second — Data types, 100 users, 10 rows

.NET 10 .NET 11 How many requests were answered per second. More is better. The label on the right says how .NET 11 did against .NET 10.

Plain Npgsql
.NET 1015,417req/s
.NET 1115,292req/s
about the same
Dapper
.NET 1015,374req/s
.NET 1115,286req/s
about the same
EF Core
.NET 1010,111req/s
.NET 1110,375req/s
about the same

The code of this test:the script that sends the requests · the PostgreSQL function it calls · the same as a SQL file. Click .NET 10 ↗ or .NET 11 ↗ next to a bar to open that service's own code for this test.

Things worth trying in the chart above:

  • Data types, 100 users, then "Requests per CPU core". Throughput is the same, but .NET 11 gets about a third more requests out of each core. In these tests the tool sending the requests was the limit, so throughput could not rise; .NET 11 simply used less processor for the same work.
  • Minimal request, or Many parameters, with "Requests per second". Here nothing held the services back, and .NET 11 is slower with plain Npgsql and Dapper.
  • "Memory" in any test. The two runtimes are within a few percent.

The averages ​

The change from .NET 10 to .NET 11 over all 44 tests. A plus is good for the first two columns; a minus is good for the last two.

Requests/sRequests/s per CPU corePeak memoryp99 latency
Plain Npgsql−2.5%+21%+6%+2%
Dapper−2.7%+21%+5%−1%
EF Core+1.8%+10%−3%+5%

What this means:

  • If your endpoints return rows, .NET 11 saves CPU. In the data types, POST body and nested JSON tests, plain Npgsql needed 23% less CPU per request and Dapper 23% less.
  • If your endpoints are tiny, .NET 11 is a little slower. In the minimal, many parameters and table read tests, it handled 9% fewer requests with plain Npgsql and 8% fewer with Dapper. Every test ran once, so a few percent could be chance, but the same result in four different kinds of test and in both styles is unlikely to be.
  • EF Core gained a little everywhere (+1.8% requests per second, +10% per core). It also has a newer EF Core version, so that is not the runtime alone.
The same numbers for each kind of test

Requests per second, .NET 11 against .NET 10

Kind of testPlain NpgsqlDapperEF Core
Data types+0.1%−0.9%+1.4%
Minimal request−9.4%−8.3%+0.1%
POST body−1.5%−3.1%+1.4%
Nested JSON−0.3%−0.5%−0.1%
Large payload−0.6%−0.9%+6.6%
Many parameters−9.2%−6.8%+3.8%
Table lookup−9.0%−7.8%+0.5%
Table list page−8.1%−7.8%+1.9%
Table insert−1.6%−0.3%+3.0%
All 44 tests−2.5%−2.7%+1.8%

Requests per second per CPU core, .NET 11 against .NET 10

Kind of testPlain NpgsqlDapperEF Core
Data types+33%+36%+16%
Minimal request+0%−4%−1%
POST body+26%+24%+6%
Nested JSON+34%+31%+8%
Large payload+10%+13%+12%
Many parameters−3%−3%+4%
Table lookup−1%+4%+4%
Table list page+3%−0%+2%
Table insert+12%+8%+5%
All 44 tests+21%+21%+10%

Question 2: EF Core, Dapper or plain Npgsql? ​

Pick a test. All six services in one chart, fastest first. Choose the kind of test, the number of users, and what to look at.

Kind of test
Users at the same time
Rows in the response
Show
Requests per second: Data types, 100 users, 10 rows

↑ longer bar is betterHow many requests each service answered per second, with 100 users sending requests at the same time.

  1. 1.NET 10 · plain Npgsql15,417req/sk6 limit
  2. 2.NET 10 · Dapper15,374req/sk6 limit
  3. 3.NET 11 · plain Npgsql15,292req/sk6 limit
  4. 4.NET 11 · Dapper15,286req/sPG limit
  5. 5.NET 11 · EF Core10,375req/s
  6. 6.NET 10 · EF Core10,111req/s

The code of this test:the script that sends the requests · the PostgreSQL function it calls · the same as a SQL file. Click a service's name (↗) to open its own code for this test.

The averages ​

Dapper and EF Core against plain Npgsql, both on .NET 11, over all 44 tests. Plain Npgsql is the baseline: 0% would mean "the same".

Requests/sRequests/s per CPU corePeak memoryp99 latency
Dapper−1.6%−3%+7%−1%
EF Core−36.7%−51%+34%+33%

What this means:

  • Dapper costs almost nothing. It is −1.6% in requests per second against reading every column by hand, and the code is 155 lines instead of 281.
  • EF Core costs about a third of the throughput: −37% in requests per second and +34% in memory. The gap is smallest when the response is large (the database does most of the work) and largest for small requests, where EF Core's own work per query is most of the request.
  • The shortest code is the slowest, the longest is the fastest, and Dapper is the middle that gives up almost no speed.
Dapper and EF Core against plain Npgsql, for each kind of test
Kind of testDapperEF Core
Data types−1%−16%
Minimal request−1%−69%
POST body−2%−35%
Nested JSON+0%−18%
Large payload−1%−18%
Many parameters−8%−67%
Table lookup−4%−68%
Table list page−6%−61%
Table insert+3%−56%
All 44 tests−2%−37%

What the six cost to run ​

"Position" is the place on the leaderboard of all 31 services, and the speed score is explained there.

ServicePositionSpeed scoreMost memory used MBMemory when idle MBFirst answer after msImage MBRequests/s per CPU core
.NET 10 · plain Npgsql8 of 3177%31732.4547942,960
.NET 11 · plain Npgsql13 of 3175%34133.15081083,569
.NET 10 · Dapper11 of 3176%28933.5603942,876
.NET 11 · Dapper16 of 3174%31933.95061083,474
.NET 10 · EF Core25 of 3149%31245.5998961,604
.NET 11 · EF Core24 of 3150%34846.51,0191101,758

Not on this page ​

  • NpgsqlRest also runs on .NET, but it generates its API instead of having it written by hand. How it compares with these six is on its own page.
  • Every other platform is on the leaderboard and in the scorecards.
  • Native AOT builds of these services were not tested in this round.

Previous: ← Every Service, One Scorecard · Next: NpgsqlRest →

Comments