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

v3 🚀 [Feature]: brancheless as far as possible #2562

Closed
3 tasks done
the-hotmann opened this issue Aug 7, 2023 · 2 comments
Closed
3 tasks done

v3 🚀 [Feature]: brancheless as far as possible #2562

the-hotmann opened this issue Aug 7, 2023 · 2 comments

Comments

@the-hotmann
Copy link
Contributor

the-hotmann commented Aug 7, 2023

Feature Description

Fort better performance all code, that will result in branches in the decompiled assembly code will result in branches.
Would love to see this taken into consideration for v3 - as this boosts performance by quite a bit!

That would include all conditional statements, like:

  • if
  • if...else
  • if...else if....else
  • switch...case

but specially the ones that are nested.
A little YouTube Video, for the ones, that do not know what it is - this guy explains it quite good:
https://www.youtube.com/watch?v=bVJ-mWWL7cE

Additional Context (optional)

When things are getting nested or more complex, it gets harder to make themn branchless, but it is always worth the effort.

Code Snippet (optional)

No response

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my suggestion prior to opening this one.
  • I understand that improperly formatted feature requests may be closed without explanation.
@ReneWerner87
Copy link
Member

thanks for the idea, but i think the performance gain is not too big and the effort and readability is not in any relation to it

most of it should already be optimized by the golang compiler itself, but probably in other programming languages it is a big gain

@ReneWerner87
Copy link
Member

Maybe I am also wrong
can you provide data inform of benchmarks, then we could decide again based on that

@ReneWerner87 ReneWerner87 added this to v3 Nov 22, 2023
@ReneWerner87 ReneWerner87 moved this to Todo in v3 Nov 22, 2023
@ReneWerner87 ReneWerner87 moved this from Todo to Done in v3 Nov 22, 2023
@ReneWerner87 ReneWerner87 added this to the v3 milestone Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants