Author rhettinger
Recipients rhettinger
Date 2019-02-01.20:34:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1549053275.55.0.741963003925.issue35884@roundup.psfhosted.org>
In-reply-to
Content
Here's what the output looks like (here am comparing a fresh Py3.8 with Clang versus the same build with GCC-8):

$ make distclean && ./configure && make
$ py Tools/scripts/var_access_benchmark.py
Speed of different kinds of variable accesses:
   4.2 μs	read_local
   4.7 μs	read_nonlocal
  13.7 μs	read_global
  18.5 μs	read_builtin
  18.2 μs	read_classvar
  26.8 μs	read_instancevar
  20.3 μs	read_instancevar_slots
  19.1 μs	read_namedtuple
  26.9 μs	read_boundmethod
   4.5 μs	write_local
   4.8 μs	write_nonlocal
  18.8 μs	write_global
  89.9 μs	write_classvar
  37.1 μs	write_instancevar
  25.7 μs	write_instancevar_slots
   0.3 μs	loop_overhead

$ make distclean && ./configure CC=gcc-8 && make
$ py Tools/scripts/var_access_benchmark.py
Speed of different kinds of variable accesses:
   4.0 μs	read_local
   4.2 μs	read_nonlocal
  11.4 μs	read_global
  16.3 μs	read_builtin
  16.4 μs	read_classvar
  24.8 μs	read_instancevar
  20.1 μs	read_instancevar_slots
  16.8 μs	read_namedtuple
  23.2 μs	read_boundmethod
   4.3 μs	write_local
   4.5 μs	write_nonlocal
  15.4 μs	write_global
  89.4 μs	write_classvar
  33.5 μs	write_instancevar
  24.5 μs	write_instancevar_slots
   0.3 μs	loop_overhead
History
Date User Action Args
2019-02-01 20:34:36rhettingersetrecipients: + rhettinger
2019-02-01 20:34:35rhettingersetmessageid: <1549053275.55.0.741963003925.issue35884@roundup.psfhosted.org>
2019-02-01 20:34:35rhettingerlinkissue35884 messages
2019-02-01 20:34:35rhettingercreate