Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add a YAML-parsing benchmark#342

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mdboom wants to merge3 commits intopython:main
base:main
Choose a base branch
Loading
frommdboom:add-yaml-benchmark

Conversation

mdboom
Copy link
Contributor

No description provided.

Copy link
Member

@ericsnowcurrentlyericsnowcurrently left a comment

Choose a reason for hiding this comment

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

LGTM

I've left a couple of very minor comments that I'll leave to you to resolve/ignore before merging.

Comment on lines +8 to +9
This explicitly tests the pure Python implementation in pyyaml, not its C
extension.

Choose a reason for hiding this comment

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

This is a helpful comment. It may be worth moving it next to the line where we take this action. I'm guessing that's theLoader=yaml.Loader bit on line 70.

Comment on lines +23 to +61
DICT = {
'ads_flags': 0,
'age': 18,
'bulletin_count': 0,
'comment_count': 0,
'country': 'BR',
'encrypted_id': 'G9urXXAJwjE',
'favorite_count': 9,
'first_name': '',
'flags': 412317970704,
'friend_count': 0,
'gender': 'm',
'gender_for_display': 'Male',
'id': 302935349,
'is_custom_profile_icon': 0,
'last_name': '',
'locale_preference': 'pt_BR',
'member': 0,
'tags': ['a', 'b', 'c', 'd', 'e', 'f', 'g'],
'profile_foo_id': 827119638,
'secure_encrypted_id': 'Z_xxx2dYx3t4YAdnmfgyKw',
'session_number': 2,
'signup_id': '201-19225-223',
'status': 'A',
'theme': 1,
'time_created': 1225237014,
'time_updated': 1233134493,
'unread_message_count': 0,
'user_group': '0',
'username': 'collinwinter',
'play_count': 9,
'view_count': 7,
'zip': ''}

TUPLE = (
[265867233, 265868503, 265252341, 265243910, 265879514,
266219766, 266021701, 265843726, 265592821, 265246784,
265853180, 45526486, 265463699, 265848143, 265863062,
265392591, 265877490, 265823665, 265828884, 265753032], 60)

Choose a reason for hiding this comment

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

It may be worth it to also/instead use some real-world data, like we do for bm_tomli_loads?

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ericsnowcurrentlyericsnowcurrentlyericsnowcurrently approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mdboom@ericsnowcurrently

[8]ページ先頭

©2009-2025 Movatter.jp