Skip to content

bpo-42093: Add opcode cache for LOAD_ATTR #22803

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

Merged
merged 1 commit into from
Oct 20, 2020
Merged

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Oct 20, 2020

These are the benchmark results for the pyperformance test suite with PGO/LTO/CPU ISOLATION in a tuned system with pyperf:

+-------------------------+--------------------------------------+-------------------------------------+
| Benchmark               | 2020-10-20_01-18-master-de73d432bb29 | 2020-10-20_02-28-cache-68f931f6938a |
+=========================+======================================+=====================================+
| go                      | 407 ms                               | 349 ms: 1.17x faster (-14%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| raytrace                | 822 ms                               | 730 ms: 1.13x faster (-11%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| unpickle_pure_python    | 497 us                               | 447 us: 1.11x faster (-10%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| scimark_sor             | 311 ms                               | 280 ms: 1.11x faster (-10%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| hexiom                  | 15.4 ms                              | 14.0 ms: 1.10x faster (-9%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| logging_silent          | 302 ns                               | 276 ns: 1.10x faster (-9%)          |
+-------------------------+--------------------------------------+-------------------------------------+
| chaos                   | 176 ms                               | 163 ms: 1.08x faster (-7%)          |
+-------------------------+--------------------------------------+-------------------------------------+
| pyflate                 | 1.01 sec                             | 948 ms: 1.06x faster (-6%)          |
+-------------------------+--------------------------------------+-------------------------------------+
| scimark_lu              | 246 ms                               | 232 ms: 1.06x faster (-6%)          |
+-------------------------+--------------------------------------+-------------------------------------+
| pickle_pure_python      | 712 us                               | 674 us: 1.06x faster (-5%)          |
+-------------------------+--------------------------------------+-------------------------------------+
| regex_effbot            | 4.49 ms                              | 4.26 ms: 1.05x faster (-5%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| scimark_monte_carlo     | 160 ms                               | 153 ms: 1.05x faster (-5%)          |
+-------------------------+--------------------------------------+-------------------------------------+
| richards                | 120 ms                               | 115 ms: 1.05x faster (-4%)          |
+-------------------------+--------------------------------------+-------------------------------------+
| 2to3                    | 458 ms                               | 442 ms: 1.04x faster (-4%)          |
+-------------------------+--------------------------------------+-------------------------------------+
| regex_v8                | 33.7 ms                              | 32.5 ms: 1.04x faster (-3%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| scimark_sparse_mat_mult | 7.16 ms                              | 6.93 ms: 1.03x faster (-3%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| deltablue               | 12.1 ms                              | 11.7 ms: 1.03x faster (-3%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| regex_dna               | 268 ms                               | 261 ms: 1.03x faster (-3%)          |
+-------------------------+--------------------------------------+-------------------------------------+
| meteor_contest          | 152 ms                               | 148 ms: 1.03x faster (-3%)          |
+-------------------------+--------------------------------------+-------------------------------------+
| genshi_xml              | 89.0 ms                              | 87.1 ms: 1.02x faster (-2%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| logging_simple          | 12.8 us                              | 12.5 us: 1.02x faster (-2%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| genshi_text             | 42.4 ms                              | 41.5 ms: 1.02x faster (-2%)         |
+-------------------------+--------------------------------------+-------------------------------------+
| nbody                   | 215 ms                               | 211 ms: 1.02x faster (-2%)          |
+-------------------------+--------------------------------------+-------------------------------------+

Not significant (35): chameleon; django_template; dulwich_log; fannkuch; float; json_dumps; json_loads; logging_format; mako; nqueens; pathlib; pickle; pickle_dict; pickle_list; pidigits; python_startup; python_startup_no_site; regex_compile; scimark_fft; spectral_norm; sqlalchemy_declarative; sqlalchemy_imperative; sqlite_synth; sympy_expand; sympy_sum; sympy_str; telco; tornado_http; unpack_sequence; unpickle; unpickle_list; xml_etree_parse; xml_etree_iterparse; xml_etree_generate; xml_etree_process; sympy_integrate

https://bugs.python.org/issue42093

Copy link
Member

@1st1 1st1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, and +1, obviously.

@rhettinger
Copy link
Contributor

I verified the timings on my build. Nice work.

@pablogsal pablogsal merged commit 109826c into python:master Oct 20, 2020
@pablogsal pablogsal deleted the cache branch October 20, 2020 05:22
@pablogsal
Copy link
Member Author

Thank you all for the review and for verifying the benchmarks!

@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 21, 2021
@pablogsal
Copy link
Member Author

The buildbot errors are coming from the new LOAD_ATTR PR because is linking against this one. I will delete the comments to reduce noise

@python python deleted a comment from bedevere-bot Jan 21, 2021
@python python deleted a comment from bedevere-bot Jan 22, 2021
@python python deleted a comment from bedevere-bot Jan 22, 2021
@python python deleted a comment from bedevere-bot Jan 22, 2021
@python python deleted a comment from bedevere-bot Jan 22, 2021
@python python deleted a comment from bedevere-bot Jan 22, 2021
@python python deleted a comment from bedevere-bot Jan 22, 2021
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants