This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients Guido.van.Rossum, pablogsal, yselivanov
Date 2020-12-30.20:34:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1609360447.59.0.727992115993.issue42093@roundup.psfhosted.org>
In-reply-to
Content
>Wow, this is amazing. I just found that this is now faster than slots. 

Not only that: is even faster than the highly-tuned namedtuple access descriptors that used to be the faster access to an attribute:

3.9 results
-----------
  17.6 ns       read_classvar_from_class
  16.3 ns       read_classvar_from_instance
  23.2 ns       read_instancevar
  19.7 ns       read_instancevar_slots
  17.9 ns       read_namedtuple
  39.2 ns       read_boundmethod

Now this is the faster way to get an attribute:

3.10 results
------------
  17.9 ns       read_classvar_from_class
  16.9 ns       read_classvar_from_instance
  14.1 ns       read_instancevar
  20.0 ns       read_instancevar_slots
  18.0 ns       read_namedtuple
  40.7 ns       read_boundmethod

> Should we mention that in What's New?

Good idea!. I will prepare a PR complementing the current paragraph.
History
Date User Action Args
2020-12-30 20:34:07pablogsalsetrecipients: + pablogsal, yselivanov, Guido.van.Rossum
2020-12-30 20:34:07pablogsalsetmessageid: <1609360447.59.0.727992115993.issue42093@roundup.psfhosted.org>
2020-12-30 20:34:07pablogsallinkissue42093 messages
2020-12-30 20:34:07pablogsalcreate