Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Dapper
Discontinued Dapper - a simple object mapper for .Net [Moved to: https://github.com/DapperLib/Dapper] (by StackExchange)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
It needs to be emphasized how artificial these benchmarks really are. Here is the source for the Fortunes C# benchmark:
https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
There's no routing or templating, it just writes a bunch of strings. No one would build an actual web app this way.
The only C# benchmarks that are remotely realistic are the mvc variants, starting with aspcore-mvc-ado-pg at number 79.
just.js (#9) looks interesting
https://github.com/just-js/just
It seems to be a much tinier JavaScript runtime than Node.js (still using v8), but linux only
The benchmark is probably unrealistically optimized code but even so, it implies Node.js itself has a large performance overhead
I always assumed Python could scale because of Reddit: https://github.com/reddit-archive/reddit
Not quite sure if their current site's code is opensource... anyone know?
Like there wouldn't be anything in between /s
There are "simple ORMs" that only map results of SQL queries to objects. They do not provide a magic query API - which is the source of most problems. I don't do Python, but for .NET there is Dapper https://github.com/StackExchange/Dapper, you can have a look what I mean. You write the SQL query, explicitly execute it, the library maps the results of that query into objects (it's C#, so you have to declare the class. In Python I'd imagine it would create the object for you)
Why is it so? I've got 100K requests per sec with PHP easily [1]
[1] https://github.com/gotzmann/comet
The biggest difference between the two API frameworks is that Falcon is synchronous while Sanic is asynchronous. With Sanic, you would explicitly specify async/await for asynchronous operations and use asynchronous libraries for I/O. Both are plenty fast.
FastAPI [1] is also worth considering if you are looking into asynchronous API frameworks. It comes with nice features for specifying API schemas.
[1]: https://fastapi.tiangolo.com/
It would be cool to teach the python static type checkers such as pyright and mypy to do the same validation as pydantic, marshmallow.
Then you could use dataclasses and map them to the database via sqlalchemy.
https://github.com/adsharma/dataclasses-sql
Couple of other techniques to speedup python:
* Transpile python to another language (py2many)