[Speed] Update Django from 1.11 to 2.0? What about Python 2.7 and PyPy2?

Stefan Behnel stefan_ml at behnel.de
Fri Jan 19 05:28:10 EST 2018


INADA Naoki schrieb am 16.01.2018 um 12:37:
>> Even though it's not good for comparing interpreter performance, it's good
>> for people comparing Python 2 and 3.
>>
>> If Django 2.0 on Python 3.7 is much faster than Django 1.11 on Python 2.7,
>> it's nice carrot for people moving forward.
>>
> 
> FYI, Django 2 is about 2x faster than 1.11 on django_template benchmark!
> It's because Django 1.11 calls force_text() many times for Python 2
> compatibility.
> 
> https://github.com/django/django/blob/419705bbe84e27c3d5be85f198a0352a6724927e/django/utils/encoding.py#L58
> https://github.com/django/django/blob/419705bbe84e27c3d5be85f198a0352a6724927e/django/template/defaulttags.py#L225
> 
> Actually, dropping Python 2 support makes Django faster.  It's nice news!

That suggests adding Django 2 as a new Py3-only benchmark.

Stefan


More information about the Speed mailing list