Hi, While randomly surfing for performance comparisons, it struck me that PyPy is faster than normal Python. (I might be wrong though) My question is - is Flask compatible with PyPy? Pardon me if I come across as ignorant. -- *-- REGARDS* * MAHESH LAL* * *
First result when googling "pypy flask": https://bitbucket.org/pypy/compatibility/wiki/flask Yes, Flask is compatible with pypy. :) Smartboy On Thu, Nov 1, 2012 at 8:58 AM, Mahesh Lal <mahesh.2910@gmail.com> wrote: > Hi, > > While randomly surfing for performance comparisons, it struck me that PyPy > is faster than normal Python. (I might be wrong though) > > My question is - is Flask compatible with PyPy? > > Pardon me if I come across as ignorant. > > -- > *-- REGARDS* > * > > MAHESH LAL* > * > * > >
Flask is tested against PyPy so I would assume yes. However, the things that PyPy is designed to be faster for do not really coincide with the types of things Flask uses/does. I doubt you would see much difference. Cheers, Edd On 1 Nov 2012, at 15:58, Mahesh Lal wrote: > Hi, > > While randomly surfing for performance comparisons, it struck me that PyPy is faster than normal Python. (I might be wrong though) > > My question is - is Flask compatible with PyPy? > > Pardon me if I come across as ignorant. > > -- > -- REGARDS > > MAHESH LAL > >
Yes. Flask alone usually is, but 3rd party libraries or modules might not be. If you use a simple and dry stack you have high chances to run it on pypy, and the performance gain is awesome. So a good advice is just try it out. att Anderson 2012/11/1 Mahesh Lal <mahesh.2910@gmail.com> > Hi, > > While randomly surfing for performance comparisons, it struck me that PyPy > is faster than normal Python. (I might be wrong though) > > My question is - is Flask compatible with PyPy? > > Pardon me if I come across as ignorant. > > -- > *-- REGARDS* > * > > MAHESH LAL* > * > * > > -- Anderson Pierre Cardoso Software Engineer - IT3S / University of Sao Paulo * http://www.apierrecardoso.com* twitter: *@apierre_cardoso* <https://twitter.com/#%21/apierre_cardoso>
On 1 Nov 2012, at 16:10, Anderson Cardoso wrote: > Yes. Flask alone usually is, but 3rd party libraries or modules might not be. > If you use a simple and dry stack you have high chances to run it on pypy, and the performance gain is awesome. Can you explain/describe how the performance gain is so significant for Flask? I can't imagine how it could be in terms of what Flask is and does. I would think the bottlenecks would be elsewhere, e.g., the network and so on. Would be interested to know! :-) Cheers, Edd > > So a good advice is just try it out. > att > > Anderson > > > 2012/11/1 Mahesh Lal <mahesh.2910@gmail.com> > Hi, > > While randomly surfing for performance comparisons, it struck me that PyPy is faster than normal Python. (I might be wrong though) > > My question is - is Flask compatible with PyPy? > > Pardon me if I come across as ignorant. > > -- > -- REGARDS > > MAHESH LAL > > > > > > -- > Anderson Pierre Cardoso > Software Engineer - IT3S / University of Sao Paulo > > http://www.apierrecardoso.com > twitter: @apierre_cardoso > >
if you are considering the overall performance of a large web app, then you are right, the bootlenecks would probably be the network or database. But I've said that on the context of only flask executing. If you can gain performance, by only switching the call (from python my_app.py to pypy my_app.py) then I dont see why not do that ;) I've had a tornado app before, where we switched to pypy, and the overall performance was quite sensible. in this link, there is a interesting comparison. I don't know how things evolved since then. http://casbon.me/what-will-pypy-do-for-your-website-benchmarki here is another interestng one: http://pygrunn-paylogic.blogspot.com.br/2011/12/flask-and-mongodb-on-pypy-benchmark.html as I said, you just test it and see how things go. The barrier to do so is minimal. att 2012/11/1 Edd Robinson <me@eddrobinson.net> > On 1 Nov 2012, at 16:10, Anderson Cardoso wrote: > > > Yes. Flask alone usually is, but 3rd party libraries or modules might > not be. > > If you use a simple and dry stack you have high chances to run it on > pypy, and the performance gain is awesome. > > Can you explain/describe how the performance gain is so significant for > Flask? > > I can't imagine how it could be in terms of what Flask is and does. I > would think the bottlenecks would be elsewhere, e.g., the network and so on. > > Would be interested to know! :-) > > Cheers, > Edd > > > > > > So a good advice is just try it out. > > att > > > > Anderson > > > > > > 2012/11/1 Mahesh Lal <mahesh.2910@gmail.com> > > Hi, > > > > While randomly surfing for performance comparisons, it struck me that > PyPy is faster than normal Python. (I might be wrong though) > > > > My question is - is Flask compatible with PyPy? > > > > Pardon me if I come across as ignorant. > > > > -- > > -- REGARDS > > > > MAHESH LAL > > > > > > > > > > > > -- > > Anderson Pierre Cardoso > > Software Engineer - IT3S / University of Sao Paulo > > > > http://www.apierrecardoso.com > > twitter: @apierre_cardoso > > > > > > -- Anderson Pierre Cardoso Software Engineer - IT3S / University of Sao Paulo * http://www.apierrecardoso.com* twitter: *@apierre_cardoso* <https://twitter.com/#%21/apierre_cardoso>
Those links are very interesting - thanks! Cheers, Edd On 1 Nov 2012, at 16:45, Anderson Cardoso wrote: > if you are considering the overall performance of a large web app, then you are right, the bootlenecks would probably be the network or database. > But I've said that on the context of only flask executing. If you can gain performance, by only switching the call (from python my_app.py to pypy my_app.py) then I dont see why not do that ;) > I've had a tornado app before, where we switched to pypy, and the overall performance was quite sensible. > > in this link, there is a interesting comparison. I don't know how things evolved since then. > http://casbon.me/what-will-pypy-do-for-your-website-benchmarki > here is another interestng one: http://pygrunn-paylogic.blogspot.com.br/2011/12/flask-and-mongodb-on-pypy-benchmark.html > > as I said, you just test it and see how things go. The barrier to do so is minimal. > > att > > > > 2012/11/1 Edd Robinson <me@eddrobinson.net> > On 1 Nov 2012, at 16:10, Anderson Cardoso wrote: > > > Yes. Flask alone usually is, but 3rd party libraries or modules might not be. > > If you use a simple and dry stack you have high chances to run it on pypy, and the performance gain is awesome. > > Can you explain/describe how the performance gain is so significant for Flask? > > I can't imagine how it could be in terms of what Flask is and does. I would think the bottlenecks would be elsewhere, e.g., the network and so on. > > Would be interested to know! :-) > > Cheers, > Edd > > > > > > So a good advice is just try it out. > > att > > > > Anderson > > > > > > 2012/11/1 Mahesh Lal <mahesh.2910@gmail.com> > > Hi, > > > > While randomly surfing for performance comparisons, it struck me that PyPy is faster than normal Python. (I might be wrong though) > > > > My question is - is Flask compatible with PyPy? > > > > Pardon me if I come across as ignorant. > > > > -- > > -- REGARDS > > > > MAHESH LAL > > > > > > > > > > > > -- > > Anderson Pierre Cardoso > > Software Engineer - IT3S / University of Sao Paulo > > > > http://www.apierrecardoso.com > > twitter: @apierre_cardoso > > > > > > > > > -- > Anderson Pierre Cardoso > Software Engineer - IT3S / University of Sao Paulo > > http://www.apierrecardoso.com > twitter: @apierre_cardoso > >
I did same experimenting with pypy1.7 and faster than werzeug, but the point is you will use gunicorn, mod_wsgi(doesn't work with pypy when I checked last time) or uWSGI for deployment. It also depends of SQLalchemy performance if you use . On Thu, Nov 1, 2012 at 11:04 PM, Edd Robinson <me@eddrobinson.net> wrote: > > Those links are very interesting - thanks! > > Cheers, > Edd > > > On 1 Nov 2012, at 16:45, Anderson Cardoso wrote: > > > if you are considering the overall performance of a large web app, then > you are right, the bootlenecks would probably be the network or database. > > But I've said that on the context of only flask executing. If you can > gain performance, by only switching the call (from python my_app.py to pypy > my_app.py) then I dont see why not do that ;) > > I've had a tornado app before, where we switched to pypy, and the > overall performance was quite sensible. > > > > in this link, there is a interesting comparison. I don't know how things > evolved since then. > > http://casbon.me/what-will-pypy-do-for-your-website-benchmarki > > here is another interestng one: > http://pygrunn-paylogic.blogspot.com.br/2011/12/flask-and-mongodb-on-pypy-benchmark.html > > > > as I said, you just test it and see how things go. The barrier to do so > is minimal. > > > > att > > > > > > > > 2012/11/1 Edd Robinson <me@eddrobinson.net> > > On 1 Nov 2012, at 16:10, Anderson Cardoso wrote: > > > > > Yes. Flask alone usually is, but 3rd party libraries or modules might > not be. > > > If you use a simple and dry stack you have high chances to run it on > pypy, and the performance gain is awesome. > > > > Can you explain/describe how the performance gain is so significant for > Flask? > > > > I can't imagine how it could be in terms of what Flask is and does. I > would think the bottlenecks would be elsewhere, e.g., the network and so on. > > > > Would be interested to know! :-) > > > > Cheers, > > Edd > > > > > > > > > > So a good advice is just try it out. > > > att > > > > > > Anderson > > > > > > > > > 2012/11/1 Mahesh Lal <mahesh.2910@gmail.com> > > > Hi, > > > > > > While randomly surfing for performance comparisons, it struck me that > PyPy is faster than normal Python. (I might be wrong though) > > > > > > My question is - is Flask compatible with PyPy? > > > > > > Pardon me if I come across as ignorant. > > > > > > -- > > > -- REGARDS > > > > > > MAHESH LAL > > > > > > > > > > > > > > > > > > -- > > > Anderson Pierre Cardoso > > > Software Engineer - IT3S / University of Sao Paulo > > > > > > http://www.apierrecardoso.com > > > twitter: @apierre_cardoso > > > > > > > > > > > > > > > > -- > > Anderson Pierre Cardoso > > Software Engineer - IT3S / University of Sao Paulo > > > > http://www.apierrecardoso.com > > twitter: @apierre_cardoso > > > > > > -- * Thanks & Regards "Talk is cheap, show me the code" -- Linus Torvalds kracekumar www.kracekumar.com *
You should also check tornado-wsgi + pypy. On Thu, Nov 1, 2012 at 11:58 PM, kracekumar ramaraju < kracethekingmaker@gmail.com> wrote: > I did same experimenting with pypy1.7 and faster than werzeug, but the > point is you will use gunicorn, mod_wsgi(doesn't work with pypy when I > checked last time) or uWSGI for deployment. It also depends of SQLalchemy > performance if you use . > > > On Thu, Nov 1, 2012 at 11:04 PM, Edd Robinson <me@eddrobinson.net> wrote: > >> >> Those links are very interesting - thanks! >> >> Cheers, >> Edd >> >> >> On 1 Nov 2012, at 16:45, Anderson Cardoso wrote: >> >> > if you are considering the overall performance of a large web app, then >> you are right, the bootlenecks would probably be the network or database. >> > But I've said that on the context of only flask executing. If you can >> gain performance, by only switching the call (from python my_app.py to pypy >> my_app.py) then I dont see why not do that ;) >> > I've had a tornado app before, where we switched to pypy, and the >> overall performance was quite sensible. >> > >> > in this link, there is a interesting comparison. I don't know how >> things evolved since then. >> > http://casbon.me/what-will-pypy-do-for-your-website-benchmarki >> > here is another interestng one: >> http://pygrunn-paylogic.blogspot.com.br/2011/12/flask-and-mongodb-on-pypy-benchmark.html >> > >> > as I said, you just test it and see how things go. The barrier to do so >> is minimal. >> > >> > att >> > >> > >> > >> > 2012/11/1 Edd Robinson <me@eddrobinson.net> >> > On 1 Nov 2012, at 16:10, Anderson Cardoso wrote: >> > >> > > Yes. Flask alone usually is, but 3rd party libraries or modules might >> not be. >> > > If you use a simple and dry stack you have high chances to run it on >> pypy, and the performance gain is awesome. >> > >> > Can you explain/describe how the performance gain is so significant for >> Flask? >> > >> > I can't imagine how it could be in terms of what Flask is and does. I >> would think the bottlenecks would be elsewhere, e.g., the network and so on. >> > >> > Would be interested to know! :-) >> > >> > Cheers, >> > Edd >> > >> > >> > > >> > > So a good advice is just try it out. >> > > att >> > > >> > > Anderson >> > > >> > > >> > > 2012/11/1 Mahesh Lal <mahesh.2910@gmail.com> >> > > Hi, >> > > >> > > While randomly surfing for performance comparisons, it struck me that >> PyPy is faster than normal Python. (I might be wrong though) >> > > >> > > My question is - is Flask compatible with PyPy? >> > > >> > > Pardon me if I come across as ignorant. >> > > >> > > -- >> > > -- REGARDS >> > > >> > > MAHESH LAL >> > > >> > > >> > > >> > > >> > > >> > > -- >> > > Anderson Pierre Cardoso >> > > Software Engineer - IT3S / University of Sao Paulo >> > > >> > > http://www.apierrecardoso.com >> > > twitter: @apierre_cardoso >> > > >> > > >> > >> > >> > >> > >> > -- >> > Anderson Pierre Cardoso >> > Software Engineer - IT3S / University of Sao Paulo >> > >> > http://www.apierrecardoso.com >> > twitter: @apierre_cardoso >> > >> > >> >> > > > -- > * > Thanks & Regards > > "Talk is cheap, show me the code" -- Linus Torvalds > kracekumar > www.kracekumar.com > * > -- * Thanks & Regards "Talk is cheap, show me the code" -- Linus Torvalds kracekumar www.kracekumar.com *
Very cool. I'm testing flask with pypy too. Thanks guys Daniel Melo (d4n1) On Nov 1, 2012 3:35 PM, "kracekumar ramaraju" <kracethekingmaker@gmail.com> wrote: > You should also check tornado-wsgi + pypy. > > > On Thu, Nov 1, 2012 at 11:58 PM, kracekumar ramaraju < > kracethekingmaker@gmail.com> wrote: > >> I did same experimenting with pypy1.7 and faster than werzeug, but the >> point is you will use gunicorn, mod_wsgi(doesn't work with pypy when I >> checked last time) or uWSGI for deployment. It also depends of SQLalchemy >> performance if you use . >> >> >> On Thu, Nov 1, 2012 at 11:04 PM, Edd Robinson <me@eddrobinson.net> wrote: >> >>> >>> Those links are very interesting - thanks! >>> >>> Cheers, >>> Edd >>> >>> >>> On 1 Nov 2012, at 16:45, Anderson Cardoso wrote: >>> >>> > if you are considering the overall performance of a large web app, >>> then you are right, the bootlenecks would probably be the network or >>> database. >>> > But I've said that on the context of only flask executing. If you can >>> gain performance, by only switching the call (from python my_app.py to pypy >>> my_app.py) then I dont see why not do that ;) >>> > I've had a tornado app before, where we switched to pypy, and the >>> overall performance was quite sensible. >>> > >>> > in this link, there is a interesting comparison. I don't know how >>> things evolved since then. >>> > http://casbon.me/what-will-pypy-do-for-your-website-benchmarki >>> > here is another interestng one: >>> http://pygrunn-paylogic.blogspot.com.br/2011/12/flask-and-mongodb-on-pypy-benchmark.html >>> > >>> > as I said, you just test it and see how things go. The barrier to do >>> so is minimal. >>> > >>> > att >>> > >>> > >>> > >>> > 2012/11/1 Edd Robinson <me@eddrobinson.net> >>> > On 1 Nov 2012, at 16:10, Anderson Cardoso wrote: >>> > >>> > > Yes. Flask alone usually is, but 3rd party libraries or modules >>> might not be. >>> > > If you use a simple and dry stack you have high chances to run it on >>> pypy, and the performance gain is awesome. >>> > >>> > Can you explain/describe how the performance gain is so significant >>> for Flask? >>> > >>> > I can't imagine how it could be in terms of what Flask is and does. I >>> would think the bottlenecks would be elsewhere, e.g., the network and so on. >>> > >>> > Would be interested to know! :-) >>> > >>> > Cheers, >>> > Edd >>> > >>> > >>> > > >>> > > So a good advice is just try it out. >>> > > att >>> > > >>> > > Anderson >>> > > >>> > > >>> > > 2012/11/1 Mahesh Lal <mahesh.2910@gmail.com> >>> > > Hi, >>> > > >>> > > While randomly surfing for performance comparisons, it struck me >>> that PyPy is faster than normal Python. (I might be wrong though) >>> > > >>> > > My question is - is Flask compatible with PyPy? >>> > > >>> > > Pardon me if I come across as ignorant. >>> > > >>> > > -- >>> > > -- REGARDS >>> > > >>> > > MAHESH LAL >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > -- >>> > > Anderson Pierre Cardoso >>> > > Software Engineer - IT3S / University of Sao Paulo >>> > > >>> > > http://www.apierrecardoso.com >>> > > twitter: @apierre_cardoso >>> > > >>> > > >>> > >>> > >>> > >>> > >>> > -- >>> > Anderson Pierre Cardoso >>> > Software Engineer - IT3S / University of Sao Paulo >>> > >>> > http://www.apierrecardoso.com >>> > twitter: @apierre_cardoso >>> > >>> > >>> >>> >> >> >> -- >> * >> Thanks & Regards >> >> "Talk is cheap, show me the code" -- Linus Torvalds >> kracekumar >> www.kracekumar.com >> * >> > > > > -- > * > Thanks & Regards > > "Talk is cheap, show me the code" -- Linus Torvalds > kracekumar > www.kracekumar.com > * >
On Thu, Nov 1, 2012 at 7:03 PM, d4n1 <d4n1h4ck@gmail.com> wrote: > Very cool. I'm testing flask with pypy too. Thanks guys > > I've been using psycopg2ct as the PostgreSQL adapter. It has worked well in my development environment. http://pypi.python.org/pypi/psycopg2ct
Thanks a lot for the suggestions. The links in this chain have been really helpful On Fri, Nov 2, 2012 at 6:27 AM, Scott Scites <scott.scites@railcar88.com>wrote: > > > On Thu, Nov 1, 2012 at 7:03 PM, d4n1 <d4n1h4ck@gmail.com> wrote: > >> Very cool. I'm testing flask with pypy too. Thanks guys >> >> I've been using psycopg2ct as the PostgreSQL adapter. It has worked well > in my development environment. > http://pypi.python.org/pypi/psycopg2ct > -- *-- REGARDS* * MAHESH LAL* * *
Here's a benchmark testing with some python web frameworks using pypy. It may be useful for you. http://casbon.me/what-will-pypy-do-for-your-website-benchmarki On Thu, Nov 1, 2012 at 2:10 PM, Anderson Cardoso <apierre.cardoso@gmail.com>wrote: > Yes. Flask alone usually is, but 3rd party libraries or modules might not > be. > If you use a simple and dry stack you have high chances to run it on pypy, > and the performance gain is awesome. > So a good advice is just try it out. > att > > Anderson > > > 2012/11/1 Mahesh Lal <mahesh.2910@gmail.com> > >> Hi, >> >> While randomly surfing for performance comparisons, it struck me that >> PyPy is faster than normal Python. (I might be wrong though) >> >> My question is - is Flask compatible with PyPy? >> >> Pardon me if I come across as ignorant. >> >> -- >> *-- REGARDS* >> * >> >> MAHESH LAL* >> * >> * >> >> > > > -- > Anderson Pierre Cardoso > Software Engineer - IT3S / University of Sao Paulo > * > http://www.apierrecardoso.com* > twitter: *@apierre_cardoso* <https://twitter.com/#%21/apierre_cardoso> > > > -- * * *Gabriel Jordão* T (71) 3494-3514 C (71) 8780-0519 gabrielpjordao@jusbrasil.com.br www.jusbrasil.com.br