Skip to content

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

Open

Description

@KyGost

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?

Activity

  1. added
    question
    on Apr 14, 2022
  2. changed the title [-]What would the performance cost of representing operations be?[/-] [+]What would the performance cost of ambiguating operations be?[/+] on Apr 15, 2022
  3. KyGost commented on Apr 15, 2022

    @KyGost
    MemberAuthor

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

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

  4. added and removed
    question
    on Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions