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

gh-90699: Remove usage of _Py_IDENTIFIER from math module #93739

Merged
merged 1 commit into from Jun 12, 2022

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Jun 12, 2022

ISSUE: #90699

@corona10
Copy link
Member Author

@corona10 corona10 commented Jun 12, 2022

Benchmark (No regression)

Benchmark hidden because not significant (3): bench_ceil, bench_floor, bench_trunc

import pyperf
import time
import math

class CustomFloat(float):
    pass


val = CustomFloat(3.14159)

def bench_ceil():
    _ = math.ceil(val)

def bench_floor():
    _ = math.floor(val)

def bench_trunc():
    _ = math.trunc(val)

runner = pyperf.Runner()
runner.bench_func('bench_ceil', bench_ceil)
runner.bench_func('bench_floor', bench_floor)
runner.bench_func('bench_trunc', bench_trunc)

Memory leak (no-leak)


Raised RLIMIT_NOFILE: 256 -> 1024
0:00:00 load avg: 7.23 Run tests sequentially
0:00:00 load avg: 7.23 [1/1] test_math
beginning 6 repetitions
123456
......

== Tests result: SUCCESS ==

1 test OK.

Total duration: 14.6 sec
Tests result: SUCCESS

@corona10 corona10 force-pushed the gh-90699-math branch 2 times, most recently from 0959a96 to dd39aa3 Compare Jun 12, 2022
@corona10 corona10 requested a review from erlend-aasland Jun 12, 2022
Copy link
Member

@mdickinson mdickinson left a comment

LGTM

@corona10 corona10 merged commit 23c9feb into python:main Jun 12, 2022
12 checks passed
@corona10 corona10 deleted the gh-90699-math branch Jun 12, 2022
@ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented Jun 13, 2022

Thanks for doing this, @corona10!

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