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 benspiller, serhiy.storchaka, vstinner
Date 2019-09-25.14:46:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569422782.61.0.0498799017542.issue38278@roundup.psfhosted.org>
In-reply-to
Content
dict.get() is a method call wheras "key in dict" and "dict[key]" are operators. Method calls are still slower than operators, even after past optimizations. For example, when dict.get was converted to METH_FASTCALL, it was around 20 ns faster:
https://vstinner.github.io/fastcall-microbenchmarks.html

See also closed bpo-17170 "string method lookup is too slow".
History
Date User Action Args
2019-09-25 14:46:22vstinnersetrecipients: + vstinner, serhiy.storchaka, benspiller
2019-09-25 14:46:22vstinnersetmessageid: <1569422782.61.0.0498799017542.issue38278@roundup.psfhosted.org>
2019-09-25 14:46:22vstinnerlinkissue38278 messages
2019-09-25 14:46:22vstinnercreate