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 malin
Recipients malin, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-11-16.08:14:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605514495.3.0.110639328789.issue42366@roundup.psfhosted.org>
In-reply-to
Content
MSVC2019 has a new option `/Ob3`, it specifies more aggressive inlining than /Ob2:
https://docs.microsoft.com/en-us/cpp/build/reference/ob-inline-function-expansion?view=msvc-160

If use this option in MSVC2017, it will emit a warning:
cl : Command line warning D9002 : ignoring unknown option '/Ob3'

Just apply `Ob3.diff`, get this improvement:
(Python 3.9 branch, No PGO, build.bat -p X64)

+-------------------------+----------+------------------------------+
| Benchmark               | baseline | ob3                          |
+=========================+==========+==============================+
| 2to3                    | 563 ms   | 552 ms: 1.02x faster (-2%)   |
+-------------------------+----------+------------------------------+
| chameleon               | 16.5 ms  | 16.1 ms: 1.03x faster (-3%)  |
+-------------------------+----------+------------------------------+
| chaos                   | 200 ms   | 197 ms: 1.02x faster (-2%)   |
+-------------------------+----------+------------------------------+
| crypto_pyaes            | 186 ms   | 184 ms: 1.01x faster (-1%)   |
+-------------------------+----------+------------------------------+
| deltablue               | 13.0 ms  | 12.6 ms: 1.03x faster (-3%)  |
+-------------------------+----------+------------------------------+
| dulwich_log             | 94.5 ms  | 93.9 ms: 1.01x faster (-1%)  |
+-------------------------+----------+------------------------------+
| fannkuch                | 806 ms   | 761 ms: 1.06x faster (-6%)   |
+-------------------------+----------+------------------------------+
| float                   | 211 ms   | 199 ms: 1.06x faster (-6%)   |
+-------------------------+----------+------------------------------+
| genshi_text             | 48.3 ms  | 47.7 ms: 1.01x faster (-1%)  |
+-------------------------+----------+------------------------------+
| go                      | 446 ms   | 437 ms: 1.02x faster (-2%)   |
+-------------------------+----------+------------------------------+
| hexiom                  | 16.6 ms  | 15.9 ms: 1.04x faster (-4%)  |
+-------------------------+----------+------------------------------+
| json_dumps              | 19.9 ms  | 19.3 ms: 1.03x faster (-3%)  |
+-------------------------+----------+------------------------------+
| json_loads              | 45.5 us  | 43.9 us: 1.04x faster (-3%)  |
+-------------------------+----------+------------------------------+
| logging_format          | 21.4 us  | 20.7 us: 1.03x faster (-3%)  |
+-------------------------+----------+------------------------------+
| logging_silent          | 343 ns   | 319 ns: 1.07x faster (-7%)   |
+-------------------------+----------+------------------------------+
| mako                    | 29.0 ms  | 27.6 ms: 1.05x faster (-5%)  |
+-------------------------+----------+------------------------------+
| meteor_contest          | 168 ms   | 162 ms: 1.04x faster (-3%)   |
+-------------------------+----------+------------------------------+
| nbody                   | 256 ms   | 244 ms: 1.05x faster (-5%)   |
+-------------------------+----------+------------------------------+
| nqueens                 | 168 ms   | 162 ms: 1.04x faster (-4%)   |
+-------------------------+----------+------------------------------+
| pathlib                 | 175 ms   | 168 ms: 1.04x faster (-4%)   |
+-------------------------+----------+------------------------------+
| pickle                  | 17.9 us  | 17.3 us: 1.04x faster (-4%)  |
+-------------------------+----------+------------------------------+
| pickle_dict             | 41.0 us  | 33.2 us: 1.24x faster (-19%) |
+-------------------------+----------+------------------------------+
| pickle_list             | 6.73 us  | 5.89 us: 1.14x faster (-12%) |
+-------------------------+----------+------------------------------+
| pickle_pure_python      | 829 us   | 793 us: 1.05x faster (-4%)   |
+-------------------------+----------+------------------------------+
| pidigits                | 243 ms   | 243 ms: 1.00x faster (-0%)   |
+-------------------------+----------+------------------------------+
| pyflate                 | 1.21 sec | 1.18 sec: 1.03x faster (-2%) |
+-------------------------+----------+------------------------------+
| raytrace                | 947 ms   | 915 ms: 1.03x faster (-3%)   |
+-------------------------+----------+------------------------------+
| regex_compile           | 291 ms   | 284 ms: 1.03x faster (-2%)   |
+-------------------------+----------+------------------------------+
| regex_dna               | 217 ms   | 222 ms: 1.02x slower (+2%)   |
+-------------------------+----------+------------------------------+
| regex_effbot            | 3.97 ms  | 4.13 ms: 1.04x slower (+4%)  |
+-------------------------+----------+------------------------------+
| regex_v8                | 35.2 ms  | 34.6 ms: 1.02x faster (-2%)  |
+-------------------------+----------+------------------------------+
| richards                | 134 ms   | 131 ms: 1.02x faster (-2%)   |
+-------------------------+----------+------------------------------+
| scimark_fft             | 616 ms   | 599 ms: 1.03x faster (-3%)   |
+-------------------------+----------+------------------------------+
| scimark_lu              | 248 ms   | 241 ms: 1.03x faster (-3%)   |
+-------------------------+----------+------------------------------+
| scimark_monte_carlo     | 187 ms   | 179 ms: 1.04x faster (-4%)   |
+-------------------------+----------+------------------------------+
| scimark_sor             | 361 ms   | 343 ms: 1.05x faster (-5%)   |
+-------------------------+----------+------------------------------+
| scimark_sparse_mat_mult | 7.71 ms  | 7.04 ms: 1.10x faster (-9%)  |
+-------------------------+----------+------------------------------+
| spectral_norm           | 249 ms   | 245 ms: 1.02x faster (-2%)   |
+-------------------------+----------+------------------------------+
| sqlalchemy_declarative  | 237 ms   | 246 ms: 1.04x slower (+4%)   |
+-------------------------+----------+------------------------------+
| sqlalchemy_imperative   | 40.6 ms  | 41.2 ms: 1.02x slower (+2%)  |
+-------------------------+----------+------------------------------+
| sqlite_synth            | 4.64 us  | 5.47 us: 1.18x slower (+18%) |
+-------------------------+----------+------------------------------+
| sympy_expand            | 738 ms   | 718 ms: 1.03x faster (-3%)   |
+-------------------------+----------+------------------------------+
| sympy_integrate         | 35.6 ms  | 34.7 ms: 1.03x faster (-3%)  |
+-------------------------+----------+------------------------------+
| sympy_sum               | 298 ms   | 295 ms: 1.01x faster (-1%)   |
+-------------------------+----------+------------------------------+
| sympy_str               | 484 ms   | 471 ms: 1.03x faster (-3%)   |
+-------------------------+----------+------------------------------+
| telco                   | 11.3 ms  | 9.76 ms: 1.16x faster (-14%) |
+-------------------------+----------+------------------------------+
| tornado_http            | 256 ms   | 254 ms: 1.01x faster (-1%)   |
+-------------------------+----------+------------------------------+
| unpack_sequence         | 94.3 ns  | 90.5 ns: 1.04x faster (-4%)  |
+-------------------------+----------+------------------------------+
| unpickle                | 23.6 us  | 22.6 us: 1.05x faster (-5%)  |
+-------------------------+----------+------------------------------+
| unpickle_list           | 6.63 us  | 6.17 us: 1.07x faster (-7%)  |
+-------------------------+----------+------------------------------+
| unpickle_pure_python    | 589 us   | 560 us: 1.05x faster (-5%)   |
+-------------------------+----------+------------------------------+
| xml_etree_parse         | 213 ms   | 209 ms: 1.02x faster (-2%)   |
+-------------------------+----------+------------------------------+
| xml_etree_iterparse     | 155 ms   | 149 ms: 1.04x faster (-4%)   |
+-------------------------+----------+------------------------------+
| xml_etree_generate      | 149 ms   | 145 ms: 1.03x faster (-3%)   |
+-------------------------+----------+------------------------------+
| xml_etree_process       | 117 ms   | 115 ms: 1.01x faster (-1%)   |
+-------------------------+----------+------------------------------+

Not significant (5): django_template; genshi_xml; logging_simple; python_startup; python_startup_no_site
History
Date User Action Args
2020-11-16 08:14:55malinsetrecipients: + malin, paul.moore, tim.golden, zach.ware, steve.dower
2020-11-16 08:14:55malinsetmessageid: <1605514495.3.0.110639328789.issue42366@roundup.psfhosted.org>
2020-11-16 08:14:55malinlinkissue42366 messages
2020-11-16 08:14:54malincreate