elm-explorations / elm-explorations/benchmark

Fuzzy benchmarks

Open
#3 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
Elm
Stars
28
Forks
4
PR merge metrics
No merged PRs in 30d

Description

**Issue by [kana-sama](https://github.com/kana-sama)**
_Tuesday Feb 28, 2017 at 17:04 GMT_
_Originally opened as https://github.com/BrianHicks/elm-benchmark/issues/7_

----

Calls of the same functions with the same arguments could be optimized by javascript engines and such benchmarks can't reveal some bottlenecks (f(5) - fast, f(6) - slow, f(7) - fast).

So imo it will be great to randomize arguments for any big iteration (50 times), like
```elm
fuzz2 : String -> (a -> b -> c) -> Generator a -> Generator b -> Benchmark
```

Of course there are some problems with `compare`, but I have some idea about stateful benchmarks (something like `fold`). And it's possible to realize `fuzz` above it with seed as state (I am reading the code right now).

Folds are basis for `map/filter/other` and they can be basis for benchmarks too :)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.