CrowdHailer / raxx

Interface for HTTP webservers, frameworks and clients
https://hexdocs.pm/raxx
Apache License 2.0
400 stars 29 forks source link

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

Open nietaki opened 5 years ago

nietaki commented 5 years ago

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

the approaches to the state structure are:

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.

CrowdHailer commented 5 years ago

@nietaki Made a slight change to how the benchmark tests are run. https://github.com/CrowdHailer/raxx/commit/8532b65b018031c2f62da2b16d01435826408de6