[Python-Dev] Possible performance regression

Eric Snow ericsnowcurrently at gmail.com
Mon Feb 25 00:04:40 EST 2019


I'll take a look tonight.

-eric

On Sun, Feb 24, 2019, 21:54 Raymond Hettinger <raymond.hettinger at gmail.com>
wrote:

> I'll been running benchmarks that have been stable for a while.  But
> between today and yesterday, there has been an almost across the board
> performance regression.
>
> It's possible that this is a measurement error or something unique to my
> system (my Mac installed the 10.14.3 release today), so I'm hoping other
> folks can run checks as well.
>
>
> Raymond
>
>
> -- Yesterday
> ------------------------------------------------------------------------
>
> $ ./python.exe Tools/scripts/var_access_benchmark.py
> Variable and attribute read access:
>    4.0 ns       read_local
>    4.5 ns       read_nonlocal
>   13.1 ns       read_global
>   17.4 ns       read_builtin
>   17.4 ns       read_classvar_from_class
>   15.8 ns       read_classvar_from_instance
>   24.6 ns       read_instancevar
>   19.7 ns       read_instancevar_slots
>   18.5 ns       read_namedtuple
>   26.3 ns       read_boundmethod
>
> Variable and attribute write access:
>    4.6 ns       write_local
>    4.8 ns       write_nonlocal
>   17.5 ns       write_global
>   39.1 ns       write_classvar
>   34.4 ns       write_instancevar
>   25.3 ns       write_instancevar_slots
>
> Data structure read access:
>   17.5 ns       read_list
>   18.4 ns       read_deque
>   19.2 ns       read_dict
>
> Data structure write access:
>   19.0 ns       write_list
>   22.0 ns       write_deque
>   24.4 ns       write_dict
>
> Stack (or queue) operations:
>   55.5 ns       list_append_pop
>   46.3 ns       deque_append_pop
>   46.7 ns       deque_append_popleft
>
> Timing loop overhead:
>    0.3 ns       loop_overhead
>
>
> -- Today
> ---------------------------------------------------------------------------
>
> $ ./python.exe py Tools/scripts/var_access_benchmark.py
>
> Variable and attribute read access:
>    5.0 ns       read_local
>    5.3 ns       read_nonlocal
>   14.7 ns       read_global
>   18.6 ns       read_builtin
>   19.9 ns       read_classvar_from_class
>   17.7 ns       read_classvar_from_instance
>   26.1 ns       read_instancevar
>   21.0 ns       read_instancevar_slots
>   21.7 ns       read_namedtuple
>   27.8 ns       read_boundmethod
>
> Variable and attribute write access:
>    6.1 ns       write_local
>    7.3 ns       write_nonlocal
>   18.9 ns       write_global
>   40.7 ns       write_classvar
>   36.2 ns       write_instancevar
>   26.1 ns       write_instancevar_slots
>
> Data structure read access:
>   19.1 ns       read_list
>   19.6 ns       read_deque
>   20.6 ns       read_dict
>
> Data structure write access:
>   22.8 ns       write_list
>   23.5 ns       write_deque
>   27.8 ns       write_dict
>
> Stack (or queue) operations:
>   54.8 ns       list_append_pop
>   49.5 ns       deque_append_pop
>   49.4 ns       deque_append_popleft
>
> Timing loop overhead:
>    0.3 ns       loop_overhead
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/ericsnowcurrently%40gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20190224/d0542e0b/attachment.html>


More information about the Python-Dev mailing list