Earlier quoted context omitted.
Pydantic is unreasonably slow for big datastructures, though. For simple performance tests with simple requests/response it's probably fast. But with lots of the data marshalling happening in python some things are really slow in real life use cases.
Author of typedload here. Pydantic is indeed really slow ( https://ltworf.github.io/typedload/performance.html ) typedload is faster and written in pure python (unlike pydantic). I know they are rewriting it in rust… but I don't know what will come out of it. After all my pure python implementation already manages to beat pydantic's binary, and when unions are in use, also apischema's binary.
Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
61–70 of 192 posts
Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
#62Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
#63This is kind of cool, but it all makes sense if your app is a very simple CRUD that spends 99% of time just passing json around. I have this feeling that when you add some more logic there you’ll start noticing that you’re not in a compiled language any more. Your requests will get slower and your memory usage will explode. Saying that Python is faster than Go with this as a proof looks like overreaching for Me. It o…
> It only proves that wrapping C code in Python is fast.
Yes, it proves that for this specific use case Python is faster.
Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
#64Earlier quoted context omitted.
>"Python backed by uWS is crazy fast, but is not an direct comparison to uWS to Go." Correction. It shows that uWS is crazy fast. Sure if python us used as a thin glue between something like "select username from user" and uWS or send file over uWS then the result is fast. Do something meaningful in Python itself an it will be slow. This is not to diminish your work. Python is mostly glue anyways so in average the en…
I see your comment as positive <3 the whole purpose of this framework is to offer better glue, to Python for Web
It is positive. You've created very nice "Web Python". No arguments here.
Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
#65Earlier quoted context omitted.
For all practical purposes, a programming language is defined by it's general real world implementation, and not it's specification. Maybe not so much for computer scientists, but for programmers, Python is interpreted with some JIT alternatives and C++ is compiled.
This is false. Making a new implementation is a practical purpose. Any new implementation will have to work with the spec, instead of idiosyncracies of other implementations. Ergo there are practical purposes which go by how the language is defined in its specification. Some languages have more of a proper spec than others, of course. If we look at for example Scheme dialects, then they often change their implementat…
Not yet it isn't. At least not for Python. I mean there are plenty of alternative implementations of Python but they aren't practical because they don't work with CPython modules (as far as I know anyway) so approximately nobody uses them. The de facto spec is "what CPython does".
Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
#66I went back to Flask recently and keep finding everything I know is deprecated, or not best practice any more.
Then I read every week that some new framework is out that is better.
I'm tired of it. I end up spending more time learning new things than I do building new things! Maybe I should get off hn for a while
Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
#67This is kind of cool, but it all makes sense if your app is a very simple CRUD that spends 99% of time just passing json around. I have this feeling that when you add some more logic there you’ll start noticing that you’re not in a compiled language any more. Your requests will get slower and your memory usage will explode. Saying that Python is faster than Go with this as a proof looks like overreaching for Me. It o…
It does not say that Python is faster than Go it clearly says "Python framework". > It only proves that wrapping C code in Python is fast. Yes, it proves that for this specific use case Python is faster.
Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
#68Since we're in the useless benchmark, this Go native library completely wreck any C/C++ lib wrapped by Python: https://github.com/panjf2000/gnet It is as fast as the fastest C++ / Rust implementation.
Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
#69I'm feeling old. I went back to Flask recently and keep finding everything I know is deprecated, or not best practice any more. Then I read every week that some new framework is out that is better. I'm tired of it. I end up spending more time learning new things than I do building new things! Maybe I should get off hn for a while
Re: Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
#70[0] https://github.com/cirospaciari/socketify.py/tree/main/src/s...