News for hackers. Stuff that matters.
Re:Sanic – Python 3.5+ web server that's written to go fast by dr_zoidberg on Saturday October 15, 2016 @12:57PM (#12714686)
If you wanted to run in PyPy, you should've written your code to be PyPy-friendly from the beginning. Standard CPython optimizations don't usually fare well in PyPy, and you can end up with even slower speed if you follow those. Still, you didn't mention profiling the hotspots of your server, nor using Cython to optimize them.

I don't see how writing an optimzed web server in Python becomes oxymoronic -- it can still be the fastest performing python server, and have a valid use case for those that want to work in Python.

Re:Sanic – Python 3.5+ web server that's written to go fast by saynsedit on Saturday October 15, 2016 @02:39PM (#12715131)
Your PyPy point is fair. A PyPy-oriented optimization effort could have improved performance. N/s by what magnitude though.

I did extensive benchmarking until there were no more hot spots, didn't help. Dropping into C or Cython was a non-goal. For dev an embedded Python web server is convenient but it doesn't have to be fast. When it comes to performance, it always makes more sense to use a native-code web server in production.

Re:Sanic – Python 3.5+ web server that's written to go fast by dr_zoidberg on Saturday October 15, 2016 @07:09PM (#12716038)
I mentioned profiling and benchmarking because they were missing. Totally agree with you, Python implemented servers are usually used in dev ops, and then you move to a "standard" http-server (be that nginx, apache, whatever).

I still think that a Python server can have it's use, and there's nothing wrong in trying to make it as fast as posible.

I'm curious, why were C/Cython non-goals?

Re:Sanic – Python 3.5+ web server that's written to go fast by vram22 on Saturday October 15, 2016 @06:01PM (#12715840)
"Dropping into C or Cython was a non-goal."

Why not Cython?

Re:Sanic – Python 3.5+ web server that's written to go fast by saynsedit on Saturday October 15, 2016 @10:48PM (#12716623)
at the time, I preferred to write it completely in C++ than have a mixed Python/Cython codebase.