Skip to content

Benchmark different Raxx.Stack state structures and switch to the fastest one  #147

@nietaki

Description

@nietaki

I think both the performance of the following operations is important:

  • swapping out middlewares/server
  • executing the whole stack with a long list of middlewares (many push/pop operations)

the approaches to the state structure are:

  • current one - a struct
  • a tagged tuple like {:raxx_stack, middlewares, server}
  • an untagged tuple like just {middlewares, server}

The tagged tuple is probably better in case someone needs to wade through a lot of structures while debugging some problems, so if the performance is similar to the untagged one, it's probably worth keeping.

Other than that, the convenience of use shouldn't be the main factor, it's an opaque type that no-one should really touch.

Note, once an approach is picked, inlining the functions operating on the state could also have performance benefits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions