[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-35884: Add string-keys-only microbenchmark for dict access to var_access_benchmark.py #11905

Merged
merged 2 commits into from Mar 25, 2019

Conversation

Copy link
Contributor

scoder commented Feb 17, 2019

String-only key dicts are special in CPython and I think they merit their own micro benchmark.

Data structure read access:
  23.6 ns       read_list
  23.4 ns       read_deque
  26.2 ns       read_dict
  23.2 ns       read_strdict

Data structure write access:
  25.6 ns       write_list
  27.1 ns       write_deque
  33.7 ns       write_dict
  29.1 ns       write_strdict

(I hope this is not worth creating a ticket…)

https://bugs.python.org/issue35884

Copy link
Contributor Author

scoder commented Feb 17, 2019

@rhettinger, please review.
And thanks for the script! It's a really nice way to compare and tune these basic operations.

scoder changed the title Add string-keys-only microbenchmark for dict access to var_access_benchmark.py bpo-35884: Add string-keys-only microbenchmark for dict access to var_access_benchmark.py Feb 17, 2019
rhettinger merged commit 68d228f into python:master Mar 25, 2019
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants