https://github.com/cloud8421/elixir-benchmark-test
Repository with performance benchmarks for Elixir.
https://github.com/cloud8421/elixir-benchmark-test
Last synced: over 1 year ago
JSON representation
Repository with performance benchmarks for Elixir.
- Host: GitHub
- URL: https://github.com/cloud8421/elixir-benchmark-test
- Owner: cloud8421
- Created: 2013-12-15T22:52:50.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-01-02T16:36:18.000Z (over 12 years ago)
- Last Synced: 2025-01-13T01:30:05.278Z (over 1 year ago)
- Language: Elixir
- Size: 129 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ElixirBenchmarkTests
This repository collects benchmark tests for Elixir. The idea is that given two or more possible implementations for a single task, we want to see which is more performant.
## Included tests
#### Type Checker
Pass in a variable, the function determines the type. Current implementations:
- Single function, using an internal `cond`. This is closer to a traditional if/else or switch/case implementation.
- Single public function, multiple private functions with a guard clause for each type.
#### Upcase a list
Given a list of words, upcase all of them. Current implementations:
- Using `map` on the list.
- Linear recursion on the list (i.e. where memory usage increases depending on the length of the list)
- Iterative recursion on the list (also called tail, where each function call doesn't need any other following one to be computed).
More info on that [here](http://learnyousomeerlang.com/recursion#hello-recursion).
## Setup
mix deps.get
## Run
mix test
## Want to help?
You can:
- provide alternative implementations
- suggest new test cases
- build a better test output - this is very rough