Using Cython with Django. Does it make sense?

前端 未结 6 1643
滥情空心
滥情空心 2020-12-24 05:58

Is it possible to optimize speed of a mission critical application developed in Django with Cython?

Recently I have read on the internet, that Cython can turn a Pyth

6条回答
  •  一向
    一向 (楼主)
    2020-12-24 06:21

    Conceptually what you are after is possible, but you are looking in the wrong direction.

    You really should be interested in PyPy, which is an extremely promising technology for the Django (and Python) community. Benchmarks of Django on PyPy already show a 12.5X speed gain when compared to normal Python. Now even though front end static resources may contribute to the majority of page responsiveness to the end user (per S.Lott's answer above), this does not address the reality that speed gains on the server side are extremely important. Facebook had to invent HipHop PHP for this reason...the lag of PHP just couldn't cut it. Closer to home, simply consider that Meebo (a python driven site) spends tens of thousands USD per month on server infrastructure. Now can you taste the server cost savings with PyPy? Sexy!

    Check out the benchmarks: http://speed.pypy.org/

提交回复
热议问题