Skip to content
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

P2ASM opt: SKIPF as fast forward branch #181

Open
Wuerfel21 opened this issue Aug 31, 2021 · 2 comments
Open

P2ASM opt: SKIPF as fast forward branch #181

Wuerfel21 opened this issue Aug 31, 2021 · 2 comments

Comments

@Wuerfel21
Copy link
Contributor

Wuerfel21 commented Aug 31, 2021

This is just something I thought of today, that, from a cursory glance, the optimizer isn't doing yet. I'm not familiar with the ASM optimizer and it's past midnight, so I'm just throwing this out here RN.

Basically, when optimizing hubexec code, a forward JMP that goes over 6 or less instructions can be replaced by a SKIP/SKIPF with constant pattern to mitigate the FIFO flush (skipping 6 ops is 14 cycles, branch is 13..20 => save up to 6 cycles, more when skipping less than 6).

Similar thing works in cog code, skipping over up to 6 ops is 2 cycles faster than a branch, but one unrelated instruction has to be reordered after the SKIPF since the first instr can not be fast skipped. That's harder to implement, I think, and the gain is lower, so idk.

@totalspectrum
Copy link
Owner

That's a good idea, thanks!

@totalspectrum
Copy link
Owner

I'm not sure SKIPF will be as helpful any more, since the conditional execution changes to make that more aggressive.

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

No branches or pull requests

2 participants