Skip to content

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

Merged
rhettinger merged 2 commits intopython:masterfrom
scoder:microbm
Mar 25, 2019
Merged

bpo-35884: Add string-keys-only microbenchmark for dict access to var_access_benchmark.py#11905
rhettinger merged 2 commits intopython:masterfrom
scoder:microbm

Conversation

@scoder
Copy link
Copy Markdown
Contributor

@scoder 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

@scoder
Copy link
Copy Markdown
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 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
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.

4 participants