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

Unnecessary code: short jump to next line #9

Open
vsariola opened this issue Apr 30, 2020 · 1 comment
Open

Unnecessary code: short jump to next line #9

vsariola opened this issue Apr 30, 2020 · 1 comment

Comments

@vsariola
Copy link

https://github.com/hzdgopher/4klang/blob/e28554120325fcaaebbe8189eef16b57fd83f0a8/4klang_source/4klang.asm#L1497

My understanding is that this short jump to next line is unnecessary.

@mikkorantalainen
Copy link

mikkorantalainen commented Feb 26, 2022

That seems unnecessary indeed. The only plus side this could have in theory is some kind of optimal alignment, but compiler should take care of such details automatically anyway. I think this generates binary assembly 0xEB 0x00 which in this context is logically same as NOP but it depends on CPU branch prediction to execute with high performance.

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