Our great sponsors
|10 days ago||5 days ago|
|MIT License||GNU General Public License v3.0 or later|
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.
We haven't tracked posts mentioning infer-types yet.
Tracking mentions began in Dec 2020.
Show HN: Up to 100x Faster FastAPI with simdjson and io_uring on Linux 5.19
20 projects | news.ycombinator.com | 6 Mar 2023
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.
Pydantic vs Protobuf vs Namedtuples vs Dataclasses
4 projects | reddit.com/r/Python | 25 Feb 2023
I wrote typedload, which is significantly faster than pydantic. Just uses normal dataclasses/attrs/NamedTuple, has a better API and is pure Python!
Show HN: Python framework is faster than Golang Fiber
19 projects | news.ycombinator.com | 10 Jan 2023
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__  to parse the object instead of calling the parse_obj class method ? According to some PEPs , 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.
 https://docs.pydantic.dev/usage/models/#helper-functions19 projects | news.ycombinator.com | 10 Jan 2023
The perf part of the tests just seems to be a microbenchmark for seeing how fast the various frameworks can parse a 30000x300 dict of strings representing numbers .
If that is all one's application does, and can use your library in their organization/team, that's great. However a 2-3x performance boost for the parsing stage for a use case like an API call might not matter when that could be overshadowed by validation and/or upstream API calls. A realistic app would likely use a validation library like Pydantic's  to throw a custom typed-error that can be processed, e.g., localization, before returning it downstream.
What are some alternatives?
codon - A high-performance, zero-overhead, extensible Python compiler using LLVM