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 vstinner
Recipients serhiy.storchaka, vstinner, yselivanov
Date 2016-05-26.13:10:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464268252.04.0.184565962287.issue27128@psf.upfronthosting.co.za>
In-reply-to
Content
Updated bench_fast-2.py result with Python compiled with PGO+LTO, with benchmark.py fixed to compute average + standard deviation. Only getattr() really seems slower:

----------------------------------+-----------------------+--------------------------
Tests                             |              original |                  fastcall
----------------------------------+-----------------------+--------------------------
filter                            | 75.8 us +- 0.1 us (*) |         78.1 us +- 0.1 us
map                               | 72.6 us +- 0.1 us (*) |         71.4 us +- 0.0 us
sorted(list, key=lambda x: x)     | 83.7 us +- 0.1 us (*) |         82.3 us +- 0.3 us
sorted(list)                      | 14.9 us +- 0.0 us (*) |         14.7 us +- 0.0 us
b=MyBytes(); bytes(b)             |    199 ns +- 2 ns (*) |            194 ns +- 1 ns
namedtuple.attr                   |   830 ns +- 20 ns (*) | 1.09 us +- 0.01 us (+31%)
object.__setattr__(obj, "x", 1)   |    133 ns +- 0 ns (*) |            134 ns +- 1 ns
object.__getattribute__(obj, "x") |    117 ns +- 0 ns (*) |            115 ns +- 1 ns
getattr(1, "real")                | 93.2 ns +- 0.9 ns (*) |  76.9 ns +- 0.7 ns (-17%)
bounded_pymethod(1, 2)            | 73.4 ns +- 0.6 ns (*) |         70.7 ns +- 0.4 ns
unbound_pymethod(obj, 1, 2)       | 74.5 ns +- 0.2 ns (*) |         71.8 ns +- 0.6 ns
func()                            | 60.2 ns +- 0.4 ns (*) |         59.3 ns +- 0.1 ns
func(1, 2, 3)                     | 74.6 ns +- 0.4 ns (*) |         72.2 ns +- 0.3 ns
----------------------------------+-----------------------+--------------------------
Total                             |            249 us (*) |                    248 us
----------------------------------+-----------------------+--------------------------
History
Date User Action Args
2016-05-26 13:10:52vstinnersetrecipients: + vstinner, serhiy.storchaka, yselivanov
2016-05-26 13:10:52vstinnersetmessageid: <1464268252.04.0.184565962287.issue27128@psf.upfronthosting.co.za>
2016-05-26 13:10:52vstinnerlinkissue27128 messages
2016-05-26 13:10:51vstinnercreate