typedload
ucall
typedload | ucall | |
---|---|---|
5 | 13 | |
254 | 990 | |
- | 1.6% | |
8.1 | 6.4 | |
7 days ago | 18 days ago | |
Python | C | |
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
typedload
-
Show HN: Up to 100x Faster FastAPI with simdjson and io_uring on Linux 5.19
Author of typedload here!
FastAPI relies on (not so fast) pydantic, which is one of the slowest libraries in that category.
Don't expect to find such benchmarks on the pydantic documentation itself, but the competing libraries will have them.
[0] https://ltworf.github.io/typedload/
-
Pydantic vs Protobuf vs Namedtuples vs Dataclasses
I wrote typedload, which is significantly faster than pydantic. Just uses normal dataclasses/attrs/NamedTuple, has a better API and is pure Python!
- Informatica serve a qualcosa?
-
Show HN: Python framework is faster than Golang Fiber
I read all the perftests in the repo. I think they nearly all parse a structure that contains a repetition of the same or similar thing a couple hundred thousand times times and the timing function returns the min and max of 5 attempts. I just picked one example for posting.
Not a Python expert, but could the Pydantic tests be possibly not realistic and/or misleading because they are using kwargs in __init__ [1] to parse the object instead of calling the parse_obj class method [2]? According to some PEPs [3], isn't Python creating a new dictionary for that parameter which would be included in the timing? That would be unfortunate if that accounted for the difference.
Something else I think about is if a performance test doesn't produce a side effect that is checked, a smart compiler or runtime could optimize the whole benchmark away. Or too easy for the CPU to do branch prediction, etc. I think I recall that happening to me in Java in the past, but probably not happened here in Python.
[1] https://github.com/ltworf/typedload/blob/37c72837e0a8fd5f350...
[2] https://docs.pydantic.dev/usage/models/#helper-functions
[3] https://peps.python.org/pep-0692/
ucall
- Show HN: U)Search Images demo in 200 lines of Python
-
Faster JSON-RPC on Linux kernel 5.19+ with io_uring and simdjson
Type checking was included, and union support is trivial to add. We have just added a feature request and will release it in a few days.
- FLiP Stack Weekly for 13 March 2023
-
Show HN: Up to 100x Faster FastAPI with simdjson and io_uring on Linux 5.19
You are right! For the convenience of Python users, we have to introspect the messages and parse JSON into Python objects. Every member of every dictionary being allocated on heap.
To make it as fast as possible we don't use PyBind, NanoBind, SWIG, or any high-level tooling. Our Python bindings are a pure CPython integration. There is just no way to beat that combo, not that I know.
https://github.com/unum-cloud/ujrpc/blob/main/src/python.c
-
Lightweight RPC with `simdjson` and `io_uring` on Linux 5.19 and newer
TLDR: UJRPC reaches 230K TCP/IP round-trips per second on 1 socket. Faster than gRPC and much faster than FastAPI.
- Up to 100x Faster FastAPI with simdjson and io_uring on Linux 5.19+
What are some alternatives?
codon - A high-performance, zero-overhead, extensible Python compiler using LLVM
frontman - Frontman is an open-source API gateway written in Go that allows you to manage your microservices and expose them as a single API endpoint. It acts as a reverse proxy and handles requests from clients, routing them to the appropriate backend service.
ustore - Multi-Modal Database replacing MongoDB, Neo4J, and Elastic with 1 faster ACID solution, with NetworkX and Pandas interfaces, and bindings for C 99, C++ 17, Python 3, Java, GoLang 🗄️
msgspec - A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
pydantic-core - Core validation logic for pydantic written in rust
japronto - Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.
peps - Python Enhancement Proposals
simdjson - Parsing gigabytes of JSON per second : used by Facebook/Meta Velox, the Node.js runtime, ClickHouse, WatermelonDB, Apache Doris, Milvus, StarRocks
FrameworkBenchmarks - Source for the TechEmpower Framework Benchmarks project
koda-validate - Typesafe, Composable Validation
Muonbase - Document Database