Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "compare" command #3

Open
seriyps opened this issue Sep 12, 2019 · 0 comments
Open

Add "compare" command #3

seriyps opened this issue Sep 12, 2019 · 0 comments

Comments

@seriyps
Copy link
Owner

seriyps commented Sep 12, 2019

Would be nice to be able to not only runn benchmarks and compare results with baseline, but also to be able to define 2 implementations at the same time and compare them. Eg

-module(my_kv).
-export(...).

maps_update(input) ->
    maps:from_list([{K, K} || K <- lists:seq(1, 5000)]).

bench_maps_update(Map) ->
    Map#{2500 => -1}.

dict_update(input) ->
    dict:from_list([{K, K} || K <- lists:seq(1, 5000)]).

bench_dict_update(Dict) ->
    dict:store(2500, -1, Dict).
$ rebar3 bench cmp my_kv:maps_update my_kv:dict_update

And this command will run 2 benchmarks and do all the statistical computations and comparision and will tell which implementation is faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant