GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Faster tracing test by markshannon · Pull Request #6 · faster-cpython/cpython

Conversation

@markshannon

@markshannon markshannon commented Apr 7, 2021

Copy link
Copy Markdown
Member

For review only

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@markshannon markshannon added the DO NOT MERGE label Apr 7, 2021
gvanrossum
gvanrossum reviewed Apr 7, 2021
View reviewed changes

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Okay, I think I understand this now, and while it makes me uneasy, I also understand the point, so I guess I support it. But a few things gave me pause...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Include/cpython/pystate.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/ceval.c Outdated
Comment on lines 1301 to 1303

@gvanrossum gvanrossum Apr 7, 2021

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Maybe make this macro a one-liner too? It would seem to fit. :-)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Python/ceval.c Outdated

@gvanrossum gvanrossum Apr 7, 2021

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

For stylistic reasons (consistency with e.g. DISPATCH()) I'd prefer making this a function macro, and moving the semicolon to after the "call". Seeing DISPATCH_GOTO (line 1317) without a semicolon makes my mind do a double-take each time I see it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Python/ceval.c Outdated

@gvanrossum gvanrossum Apr 7, 2021

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Hm, this is disturbing -- tstate (which is pretty much a global structure) now has a pointer to a local variable. That means you have to restore this on every exit from the function. Now, we know there's only one exit, and it's handled there, but it still makes me feel weird. And all this to make it possible to set a single int (perhaps even a single bit) from "outside" this function.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@markshannon markshannon Apr 8, 2021

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I know, and it would seem like overkill, if it weren't for how critical reads of that single int are.
That one int gets read 100 million times per second, and the code to read it occurs over 100 times in the interpreter.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@markshannon

markshannon commented Apr 8, 2021

Copy link
Copy Markdown
Member Author

I've made the relevant changes to python#25244
I'll apply the others to the upcoming PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

markshannon added 2 commits April 8, 2021 11:23
@markshannon
Remove redundant tracing_possible field from interpreter state.
88fc80c
@markshannon
Move 'use_tracing' from tstate onto C stack, for fastest possible che…
6458071
…cking in dispatch logic.
@markshannon
markshannon force-pushed the faster-tracing-test branch 3 times, most recently from f9fdb65 to 7262620 Compare April 8, 2021 10:47
@markshannon markshannon closed this Apr 8, 2021
@markshannon markshannon reopened this Apr 8, 2021
@markshannon
Add more comments strssing the importance satck discipline when deali…
2cf3c98
…ng with CFrames.
@markshannon
markshannon force-pushed the faster-tracing-test branch from 7262620 to 2cf3c98 Compare April 8, 2021 11:00
@markshannon
Add NEWS
5ba8650
@markshannon

markshannon commented Apr 8, 2021

Copy link
Copy Markdown
Member Author

python#25276

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon markshannon closed this Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gvanrossum gvanrossum gvanrossum left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

DO NOT MERGE

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@markshannon @gvanrossum
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.