Pyramid's Optimizations - why it executes less code to do more work
1–6 of 6 posts
Re: Pyramid's Optimizations - why it executes less code to do more work
#2According to the article, Pyramid pushes a lot of work to C code. But then they measure relative performance by how much output the Python profiler has. However anything done in C is invisible to the Python profiler. That means that time is being spent and work is being done that they are not measuring.
The result is probably pretty fast. But I strongly doubt it is faster by the factor that their numbers claim.
Re: Pyramid's Optimizations - why it executes less code to do more work
#3Re: Pyramid's Optimizations - why it executes less code to do more work
#4They are measuring speed in an unfair way. According to the article, Pyramid pushes a lot of work to C code. But then they measure relative performance by how much output the Python profiler has. However anything done in C is invisible to the Python profiler. That means that time is being spent and work is being done that they are not measuring. The result is probably pretty fast. But I strongly doubt it is faster by…
Re: Pyramid's Optimizations - why it executes less code to do more work
#5They are measuring speed in an unfair way. According to the article, Pyramid pushes a lot of work to C code. But then they measure relative performance by how much output the Python profiler has. However anything done in C is invisible to the Python profiler. That means that time is being spent and work is being done that they are not measuring. The result is probably pretty fast. But I strongly doubt it is faster by…
Python function calls have overhead. Avoiding them is a common optimization technique.
Of course that speeds up the code. But it reduces the Python profiler output by more than it speeds up the code. Therefore measuring the speedup by looking at the Python profiler is inappropriate.
Re: Pyramid's Optimizations - why it executes less code to do more work
#6Earlier quoted context omitted.
Python function calls have overhead. Avoiding them is a common optimization technique.
You seem to have entirely missed my point. Of course that speeds up the code. But it reduces the Python profiler output by more than it speeds up the code. Therefore measuring the speedup by looking at the Python profiler is inappropriate.
http://plope.com/static/noncoptimized.txt
That's 27 lines of profiler output, which, if you're keeping score, is still fewer lines than any other framework tested. We're not really hiding anything here.
The comparisons to other frameworks are largely a gimmick to drive traffic and comments, granted. In the real world, these numbers shouldn't make the difference about whether you choose one framework or another.
However, there are actual speedups to be had by other Python web frameworks if they'd consider using some of the techniques outlined in the blog post. In the real world, actual benchmarks seem to have Pyramid bottlenecked by the WSGI server (see for example http://blog.curiasolutions.com/2010/11/the-great-web-technol...), so the optimizations we're doing are working, AFAICT.