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

Constant phases#567

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

Merged
ambv merged 4 commits intomasterfromconstant_phases
Feb 21, 2024
Merged

Constant phases#567

ambv merged 4 commits intomasterfromconstant_phases
Feb 21, 2024

Conversation

ambv
Copy link
Member

@ambvambv commentedMar 3, 2023

This is#272 but rebased on top of current master.

I made cursory benchmarking of this and I see no difference between master and this branch.

PythonTests executedTime with PRTime on master
2.7.182823847.3s47.2s
3.9.161906213.4s13.6s
3.11.22356312.4s12.4s
pypy3.82356344.3s44.4s

Each timing is geomean from 30 runs. This is executed on Homebrew builds of all Pythons above on an M1 Max Macbook Pro. The slow result from pypy3 (v7.3.9) is because it's running in Rosetta (x86-64 emulation). The important thing is to compare the time on the PR with the time on master.

gsneddersand others added3 commitsSeptember 27, 2020 21:43
This added a fair bit of complexity, and notable made the Phase classesdynamically generated.However, by doing this, we no longer include "process thetoken using the rules for" phases in the debug log.
@ambv
Copy link
MemberAuthor

ambv commentedMar 3, 2023

When looking at the PR without whitespace changes, it's not that complicated. All tests pass, no performance regression.

I think this should go in as is. This will help us optimize, whether with Cython or with mypyc, as the result is a plain oldPhase class, which I like 👍🏻

@@ -204,6 +191,9 @@ def mainLoop(self):
DoctypeToken = tokenTypes["Doctype"]
ParseErrorToken = tokenTypes["ParseError"]

type_names = {value: key for key, value in tokenTypes.items()}
Copy link
Member

Choose a reason for hiding this comment

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

I suppose one could skip computing this unlessdebug is set, but probably not worthwhile.

@ambvambv merged commitfd4f032 intomasterFeb 21, 2024
@ambvambv deleted the constant_phases branchFebruary 21, 2024 15:31
@ambvambv mentioned this pull requestFeb 21, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jgrahamjgrahamjgraham 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.

3 participants
@ambv@jgraham@gsnedders

[8]ページ先頭

©2009-2025 Movatter.jp