-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
Milestone
Description
Hi @PragTob, first of all, thank you for such an amazing library, it helps me every now and then to make Elixir an even better language.
I would like to suggest to change from maps to keywords lists for the list of jobs.
The reason is that since map is not an ordered structure, it may change the order of the execution depending on the name of the key.
As of now, Benchee.run/2 works with either maps and keyword lists since it takes any enumerable.
The specs for this function should also be updated.
The examples in the README file would also look like this.
Benchee.run(
[
"flat_map": fn -> Enum.flat_map(list, map_fun) end,
"map.flatten": fn -> list |> Enum.map(map_fun) |> List.flatten() end
]
)This is the way I set all my benchmarks.
Thank you.