[Python-Dev] FAT Python (lack of) performance (original) (raw)
Andrew Barnert abarnert at yahoo.com
Tue Jan 26 00:44:07 EST 2016
- Previous message (by thread): [Python-Dev] FAT Python (lack of) performance
- Next message (by thread): [Python-Dev] FAT Python (lack of) performance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jan 25, 2016, at 19:32, INADA Naoki <songofacandy at gmail.com> wrote:
On Tue, Jan 26, 2016 at 12:02 PM, Andrew Barnert <abarnert at yahoo.com> wrote: On Jan 25, 2016, at 18:21, INADA Naoki <songofacandy at gmail.com> wrote: > > I'm very interested in it. > > Ruby 2.2 and PHP 7 are faster than Python 2. > Python 3 is slower than Python 2.
Says who? For example, http://benchmarksgame.alioth.debian.org/u64q/php.html In Japanese, many people compares language performance by microbench like fibbonacci.
"In Japan, the hand is sharper than a knife [man splits board with karate chop], but the same doesn't work with a tomato [man splatters tomato all over himself with karate chop]."
A cheap knife really is better than a karate master at chopping tomatoes. And Python 2 really is better than Python 3 at doing integer arithmetic on the edge of what can fit into a machine word. But so what? Without seeing any of your Japanese web code, much less running a profiler, I'm willing to bet that your code is rarely CPU-bound, and, when it is, it spends a lot more time doing things like processing Unicode strings that are almost always UCS-2 (about 110% slower on Python 2) than doing this kind of arithmetic (9% faster on Python 2), or cutting tomatoes (TypeError on both versions).
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160125/a3a387ad/attachment.html>
- Previous message (by thread): [Python-Dev] FAT Python (lack of) performance
- Next message (by thread): [Python-Dev] FAT Python (lack of) performance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]