Skip to content

use static reference for AsMapping / AsSequence #3750

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 9 commits into from
May 29, 2022

Conversation

youknowone
Copy link
Member

@youknowone youknowone commented May 27, 2022

3% from pystone

3.5% from fannkuch

+-----------+-----------------+------------------------+------------------------+
| Benchmark | rustpython_orig | mapping                | mapping+sequence        |
+===========+=================+========================+========================+
| fannkuch  | 3.79 sec        | 3.67 sec: 1.03x faster | 3.65 sec: 1.04x faster |
+-----------+-----------------+------------------------+------------------------+
+-----------+---------+-------------------------+
| Benchmark | cpython | rustpython-final        |
+===========+=========+=========================+
| fannkuch  | 354 ms  | 3.64 sec: 10.26x slower |
+-----------+---------+-------------------------+

@youknowone youknowone requested a review from qingshi163 May 28, 2022 06:04
@youknowone youknowone force-pushed the as-mapping-const branch 2 times, most recently from 44831bb to b4b18c9 Compare May 28, 2022 17:24
@youknowone
Copy link
Member Author

@Snowapril would you review this PR?

@youknowone youknowone changed the title simplify AsMapping simplify AsMapping / AsSequence May 28, 2022
@youknowone youknowone changed the title simplify AsMapping / AsSequence use static reference for AsMapping / AsSequence May 28, 2022
Copy link
Contributor

@Snowapril Snowapril left a comment

Choose a reason for hiding this comment

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

It seems better to use static ref than before 😊

@youknowone youknowone merged commit 8e20e23 into RustPython:main May 29, 2022
@youknowone youknowone deleted the as-mapping-const branch May 29, 2022 21:33
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.

2 participants