Author: Alex Gaynor <alex.gay...@gmail.com> Branch: extradoc Changeset: r3605:48bde73ab879 Date: 2011-06-06 11:15 +0200 http://bitbucket.org/pypy/extradoc/changeset/48bde73ab879/
Log: merged upstream. diff --git a/talk/djangocon.eu2011/pypy-talk.pdf b/talk/djangocon.eu2011/pypy-talk.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ba704683cb66ff14ef545d1716613be75d09bd94 GIT binary patch [cut] diff --git a/talk/djangocon.eu2011/talk.rst b/talk/djangocon.eu2011/talk.rst --- a/talk/djangocon.eu2011/talk.rst +++ b/talk/djangocon.eu2011/talk.rst @@ -1,177 +1,179 @@ -=============== -Django and PyPy -=============== +===================================== +Django and PyPy: performant is a word +===================================== Me --- +--- - * Django and PyPy core developer - * I like making your code faster - * Working at Quora making their codebase run on PyPy, fast. +* Django and PyPy core developer +* I like making **your** code faster +* Working at Quora making their codebase run on PyPy, fast. What is Django? --------------- -... +* Anyone knows here? What is PyPy? ------------- - * An implementation of Python 2.7.1 - * A very fast implementation - * A very compliant implementation +* An implementation of Python 2.7.1 +* A very fast implementation +* A very compliant implementation What is PyPy? (2) ----------------- - * Python written in Python - * Open source (MIT licensed) - * 8 years old - * Over 150,000 lines of test code (that's more than all of Django) - * A replacement to Psyco +* Python written in Python +* Open source (MIT licensed) +* 8 years old +* Over 150,000 lines of test code (that's more than all of Django) +* A successor to Psyco Fast ---- - * Faster than CPython on almost every benchmark we have. - * http://speed.pypy.org/ +* Faster than CPython on almost every benchmark we have. +* http://speed.pypy.org/ +* A very actively developed project: http://bit.ly/ij3W9G World's shortest introduction to JITing --------------------------------------- - * Run interpreter - * Find frequently executed loops - * Turn those loops into efficient assembler, by specializing for the types of variables and other things. +* Run interpreter +* Find frequently executed loops +* Turn those loops into efficient assembler, by specializing for the types + of variables and other things. Case studies ------------ - * Production ready - * Real people are using this to speed up their apps. +* Production ready +* Real people are using this to speed up their apps. LWN.net ------- - * Parse the output of ``git log`` and generate data/reports - * CPython: 63 seconds - * PyPy: 21 seconds +* Parse the output of ``git log`` and generate data/reports +* CPython: 63 seconds +* PyPy: 21 seconds Some guy on IRC --------------- - * Query PostgreSQL and generate reports. - * CPython: 2 minutes - * PyPy: 8 seconds +* Query PostgreSQL and generate reports. +* CPython: 2 minutes +* PyPy: 8 seconds Why isn't everyone using PyPy? ------------------------------ - * C extensions - * C-API tightly coupled to CPython implementation details +* C extensions +* C-API tightly coupled to CPython implementation details Solutions --------- - * CPyExt - * Pure Python/``ctypes`` - * Cython (GSOC) +* CPyExt +* Pure Python/``ctypes`` +* Cython (GSOC) But web apps are I/O bound... ----------------------------- - * Eh, maybe they should be, but they often aren't. +* Eh, maybe they should be, but they often aren't. The Wild Wild Web (WWW for short) --------------------------------- - * To run a Django site you need a handful of things - * Web server - * Database - * Random other libraries (``PIL``, ``lxml``, etc.) +* To run a Django site you need a handful of things +* Web server +* Database +* Random other libraries (``PIL``, ``lxml``, etc.) Web server ---------- - * WSGI - * Any pure Python server will do - * I like ``gunicorn``, you can use whatever you like - * *Not* ``mod_wsgi`` +* WSGI +* Any pure Python server will do +* I like ``gunicorn``, you can use whatever you like +* *Not* ``mod_wsgi`` Database -------- - * Use any database you like, so long as there's an adapter for it that works with both Django and PyPy! +* Use any database you like, so long as there's an adapter for it that works with both Django and PyPy! SQLite ------ - * Standard library, just works! +* Standard library, just works! PostgreSQL ---------- - * RPython ``psycopg2`` compatible lib, requires compiling your own PyPy - * ``pg8000`` and tons of other random libraries, Django doesn't work with them, but if they're pure Python they'll work with other stuff (e.g. SQLAlchemy) +* RPython ``psycopg2`` compatible lib, requires compiling your own PyPy +* ``pg8000`` and tons of other random libraries, Django doesn't work with them, but if they're pure Python they'll work with other stuff (e.g. SQLAlchemy) MySQL ----- - * (various expletives censored) - * Nothing that works with Django ATM - * I'm working on a ``ctypes`` based MySQLdb dropin replacement, hopefully open source soonish. +* (various expletives censored) +* Nothing that works with Django ATM +* I'm working on a ``ctypes`` based MySQLdb dropin replacement, hopefully open source soonish. Oracle ------ - * We have an RPython ``cx_Oracle`` - * I know nothing about its status +* We have an RPython ``cx_Oracle`` +* I know nothing about its status Other databases --------------- - * There are other databases? - * Uhh, talk to me later? +* There are other databases? +* Uhh, talk to me later? Random other libs ----------------- - * ``PIL`` - works under CPyExt - * ``lxml`` - doesn't work :( - * Others - how should I know? Others isn't very specific. +* ``PIL`` - works under CPyExt +* ``lxml`` - doesn't work :( +* Others - how should I know? Others isn't very specific. Benchmarking! ------------- - * Lies, damned lies, and statistics! - * And benchmarks - * Ignore them, you need to test *your* app. - * But if you need to convince your boss... +* Lies, damned lies, and statistics! +* And benchmarks +* Ignore them, you need to test *your* app. +* But if you need to convince your boss... Django template benchmark ------------------------- - * Part of the Unladen Swallow benchmark suite - * PyPy 1.5: almost 10x faster than CPython - * PyPy trunk: almost 12x faster +* Part of the Unladen Swallow benchmark suite +* PyPy 1.5: almost 10x faster than CPython +* PyPy trunk: almost 12x faster Rietveld benchmark ------------------ - * Another part of the Unladen Swallow benchmark suit - * PyPy trunk: about 1.35x faster than CPython +* Another part of the Unladen Swallow benchmark suite +* PyPy trunk: about 1.35x faster than CPython Tornado web app --------------- - * 2x as many requests per second +* 2x as many requests per second PyPy ---- - * A better platform for developing Python itself - * A faster Python for your apps +* A better platform for developing Python itself +* A faster Python for your apps Questions? ---------- - * http://alexgaynor.net/ - * http://pypy.org/ - * Thank you! - * Dank je wel! +* http://alexgaynor.net/ +* http://pypy.org/ +* Thank you! +* Dank je wel! _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit