Message384087
>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. |
|
Date |
User |
Action |
Args |
2020-12-30 20:34:07 | pablogsal | set | recipients:
+ pablogsal, yselivanov, Guido.van.Rossum |
2020-12-30 20:34:07 | pablogsal | set | messageid: <1609360447.59.0.727992115993.issue42093@roundup.psfhosted.org> |
2020-12-30 20:34:07 | pablogsal | link | issue42093 messages |
2020-12-30 20:34:07 | pablogsal | create | |
|