Skip to content
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

refactor: use proper lasti formula for 3.11 #178

Merged
merged 3 commits into from
Jun 4, 2023
Merged

Conversation

P403n1x87
Copy link
Owner

Description of the Change

Use the more correct expression for computing the lasti index with Python 3.11.

Alternate Designs

N. A.

Regressions

None. We expect compiler optimisations to do a good job with divisions by powers of 2.

Verification Process

Existing test suite

P403n1x87 and others added 2 commits June 4, 2023 11:34
Use the more correct expression for computing the lasti index with
Python 3.11.
@codecov
Copy link

codecov bot commented Jun 4, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.20 🎉

Comparison is base (fbec16f) 69.34% compared to head (0b864e7) 69.55%.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #178      +/-   ##
==========================================
+ Coverage   69.34%   69.55%   +0.20%     
==========================================
  Files          25       25              
  Lines        2473     2473              
  Branches      730      730              
==========================================
+ Hits         1715     1720       +5     
+ Misses        420      419       -1     
+ Partials      338      334       -4     
Impacted Files Coverage Δ
src/py_thread.c 74.08% <100.00%> (-1.03%) ⬇️

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented Jun 4, 2023

Austin Benchmarks

Running Austin benchmarks with Python 3.10.11

Wall time [sampling interval: 1]

Wall time [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 90000 ± 6000 1 ± 0 1.9e-05 ± 6e-06 18 ± 1
3.5.0 86000 ± 6000 1 ± 0 1.1e-05 ± 5e-06 18 ± 2
dev 88000 ± 4000 1 ± 0 1.5e-05 ± 7e-06 17.6 ± 0.8
Wall time [sampling interval: 10]

Wall time [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 83000 ± 10000 0.79 ± 0.05 4e-05 ± 0.0001 19 ± 2
3.5.0 87000 ± 7000 0.77 ± 0.04 1.3e-05 ± 7e-06 18 ± 2
dev 87000 ± 4000 0.73 ± 0.02 1.5e-05 ± 8e-06 17.8 ± 0.8
Wall time [sampling interval: 100]

Wall time [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 9900 ± 300 0.0041 ± 0.0008 5e-05 ± 7e-05 20.6 ± 0.7
3.5.0 9700 ± 200 0.005 ± 0.001 3e-05 ± 3e-05 20.3 ± 0.8
dev 9900 ± 100 0.0034 ± 0.0007 7e-05 ± 4e-05 19.9 ± 0.6
Wall time [sampling interval: 1000]

Wall time [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 1760 ± 20 0.0003 ± 0.0004 0.0001 ± 0.0001 33 ± 2
3.5.0 1770 ± 20 0.0004 ± 0.0002 3e-05 ± 9e-05 33 ± 2
dev 1760 ± 20 0.0004 ± 0.0004 0 ± 0 33 ± 2
CPU time [sampling interval: 1]

CPU time [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 38000 ± 2000 1 ± 0 2e-05 ± 2e-05 32 ± 2
3.5.0 36000 ± 3000 1 ± 0 2e-05 ± 2e-05 32 ± 2
dev 38000 ± 3000 1 ± 0 3e-05 ± 1e-05 32 ± 1
CPU time [sampling interval: 10]

CPU time [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 38000 ± 5000 1 ± 0 2e-05 ± 2e-05 32 ± 3
3.5.0 39000 ± 1000 1 ± 0 2e-05 ± 1e-05 31.1 ± 0.9
dev 39000 ± 3000 1 ± 0 2e-05 ± 2e-05 31 ± 2
CPU time [sampling interval: 100]

CPU time [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 4700 ± 100 0.013 ± 0.003 0.0001 ± 7e-05 37 ± 2
3.5.0 4600 ± 100 0.012 ± 0.001 8e-05 ± 4e-05 36 ± 2
dev 4800 ± 300 0.012 ± 0.002 0.0001 ± 8e-05 36 ± 1
CPU time [sampling interval: 1000]

CPU time [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 903 ± 3 0.0013 ± 0.001 0.0002 ± 0.0003 60 ± 3
3.5.0 902 ± 6 0.0009 ± 0.0008 0.0002 ± 0.0003 59 ± 3
dev 904 ± 7 0.0005 ± 0.0007 0.0003 ± 0.0003 58 ± 3
RSA keygen [sampling interval: 1]

RSA keygen [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 28000 ± 2000 1 ± 0 0.0002 ± 0.0002 35 ± 2
3.5.0 29000 ± 2000 1 ± 0 0.00013 ± 8e-05 34 ± 3
dev 28000 ± 2000 1 ± 0 0.0002 ± 0.0002 34 ± 2
RSA keygen [sampling interval: 10]

RSA keygen [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 28500 ± 500 1 ± 0 0.0003 ± 0.0003 34.3 ± 0.7
3.5.0 28000 ± 2000 1 ± 0 0.0002 ± 0.0001 35 ± 2
dev 28300 ± 600 0.9999 ± 0.0002 0.0003 ± 0.0002 34.6 ± 1.0
RSA keygen [sampling interval: 100]

RSA keygen [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 6080 ± 80 0.028 ± 0.009 0.0005 ± 0.0004 44 ± 2
3.5.0 6000 ± 100 0.02 ± 0.01 0.0005 ± 0.0008 43 ± 5
dev 6000 ± 100 0.03 ± 0.02 0.0005 ± 0.0004 44 ± 6
RSA keygen [sampling interval: 1000]

RSA keygen [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 897 ± 6 0 ± 0 0.001 ± 0.002 72 ± 5
3.5.0 902 ± 3 0.0 ± 0.002 0.001 ± 0.002 72 ± 5
dev 899 ± 3 0 ± 0 0.001 ± 0.001 68 ± 3
Full metrics [sampling interval: 1]

Full metrics [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 37000 ± 2000 1 ± 0 6e-05 ± 3e-05 42 ± 2
3.5.0 36000 ± 1000 1 ± 0 4e-05 ± 2e-05 43 ± 2
dev 36000 ± 2000 1 ± 0 4.2e-05 ± 8e-06 42 ± 2
Full metrics [sampling interval: 10]

Full metrics [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 36000 ± 2000 1 ± 0 4e-05 ± 2e-05 42 ± 2
3.5.0 36000 ± 3000 1 ± 0 4e-05 ± 1e-05 43 ± 3
dev 38000 ± 900 1 ± 0 4e-05 ± 2e-05 40 ± 1
Full metrics [sampling interval: 100]

Full metrics [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 8400 ± 200 0.035 ± 0.005 9e-05 ± 4e-05 56 ± 2
3.5.0 8300 ± 300 0.036 ± 0.004 8e-05 ± 6e-05 58 ± 4
dev 8400 ± 200 0.037 ± 0.004 9e-05 ± 7e-05 59 ± 3
Full metrics [sampling interval: 1000]

Full metrics [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 1760 ± 30 0.0011 ± 0.0009 0.0001 ± 0.0001 77 ± 4
3.5.0 1770 ± 30 0.0008 ± 0.0005 0.0001 ± 0.0001 75 ± 3
dev 1770 ± 20 0.001 ± 0.0008 0.0001 ± 0.0001 76 ± 3
Multiprocess wall time [sampling interval: 1]

Multiprocess wall time [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 1500 ± 100 1 ± 0 0.0004 ± 0.0004 430 ± 30
3.5.0 2100 ± 100 1 ± 0 0.00018 ± 6e-05 450 ± 30
dev 2100 ± 100 1 ± 0 0.00017 ± 4e-05 450 ± 30
Multiprocess wall time [sampling interval: 10]

Multiprocess wall time [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 1500 ± 100 1 ± 0 0.0004 ± 0.0005 410 ± 20
3.5.0 2100 ± 100 1 ± 0 0.0003 ± 0.0002 450 ± 20
dev 2100 ± 100 1 ± 0 0.0003 ± 0.0004 460 ± 30
Multiprocess wall time [sampling interval: 100]

Multiprocess wall time [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 1500 ± 200 0.06 ± 0.03 0.00015 ± 6e-05 420 ± 20
3.5.0 2000 ± 100 0.08 ± 0.03 0.0001 ± 3e-05 470 ± 30
dev 2100 ± 200 0.08 ± 0.03 0.0001 ± 6e-05 460 ± 40
Multiprocess wall time [sampling interval: 1000]

Multiprocess wall time [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 1300 ± 100 0.03 ± 0.02 4e-05 ± 4e-05 220 ± 90
3.5.0 1850 ± 100 0.036 ± 0.009 7e-05 ± 6e-05 250 ± 50
dev 1900 ± 100 0.02 ± 0.01 4e-05 ± 4e-05 190 ± 80

Benchmark Summary

Comparison of dev against 3.5.0.

The following scenarios show a statistically significant difference in performance between the two versions.

Sample Rate Saturation Error Rate Sampling Speed
Wall time [sampling interval: 10] 🟡 🟢 🟡 🟡
Wall time [sampling interval: 100] 🟡 🟢 🟡 🟡
RSA keygen [sampling interval: 1000] 🔴 🟡 🟡 🟡
Multiprocess wall time [sampling interval: 1000] 🟡 🟢 🟡 🟢

@P403n1x87 P403n1x87 merged commit 0484829 into devel Jun 4, 2023
@P403n1x87 P403n1x87 deleted the refactor/311-lasti branch June 4, 2023 16:16
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.

1 participant