Skip to content

Conversation

@markshannon
Copy link
Member

@markshannonmarkshannon commented Oct 4, 2021

About 1% faster

Use bitwise or instead of additional jump to handle tracing in dispatch.

What was:

if (use_tracing) goto tracing_dispatchgoto*jump_table[opcode];

becomes:

 goto *jump_table[opcode | use_tracing];

use_tracing is now either 0 or 255

Special opcode 255 (DO_TRACING) handles tracing and then jumps to the original instruction.

The main complexity comes from needing access to the last instruction when tracing. This means that we update frame->f_lasti and next_instr at the start of the instruction, instead of at the end of the previous instruction.

https://bugs.python.org/issue43760

@markshannonmarkshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 4, 2021
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @markshannon for commit a9ff904 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 4, 2021
@markshannon
Copy link
MemberAuthor

Buildbot failures seem unrelated: A network error and too many open files.

Sign up for freeto 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.

3 participants

@markshannon@bedevere-bot@the-knights-who-say-ni