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

What would the performance cost of ambiguating operations be? #142

Open
KyGost opened this issue Apr 14, 2022 · 1 comment
Open

What would the performance cost of ambiguating operations be? #142

KyGost opened this issue Apr 14, 2022 · 1 comment

Comments

@KyGost
Copy link
Member

KyGost commented Apr 14, 2022

Currently operations in recipes are stored as function pointers. As I understand it this is somewhat unsafe, and more so for comparison.

The reason I chose this was for performance, so that there is no need for a match for each time an operation is actualised.

Is the trade-off worth it?

@KyGost KyGost added question Further information is requested optimisation benchmark labels Apr 14, 2022
@KyGost KyGost changed the title What would the performance cost of representing operations be? What would the performance cost of ambiguating operations be? Apr 15, 2022
@KyGost
Copy link
Member Author

KyGost commented Apr 15, 2022

Per:
https://discord.com/channels/442252698964721669/443150878111694848/964317055929167952

Ambiguating into an Enum would likely open up many opportunities for the compiler to optimise.

@KyGost KyGost added refactor and removed question Further information is requested benchmark labels Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant