[Python-Dev] FAT Python (lack of) performance (original) (raw)

INADA Naoki songofacandy at gmail.com
Tue Jan 26 01:13:19 EST 2016


On Tue, Jan 26, 2016 at 2:44 PM, Andrew Barnert <abarnert at yahoo.com> wrote:

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). Calm down, please. I didn't say "microbench is more important than macrobench".

While editor is not a main problem of software development, people likes comparing vim and emacs. Like that, Japanese dev people likes comparing speed.

While it's not a real problem of typical application, new people should choose first (and probably main) editor and language. Slowest on such a basic microbench gives bad impression for them.

Additionally, some application (e.g. traversing DOM) makes much function calls. Faster function call may makes some real application faster.

-- INADA Naoki <songofacandy at gmail.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160126/1a2ed9c3/attachment.html>



More information about the Python-Dev mailing list