Skip to content

Instantly share code, notes, and snippets.

View robertoaloi's full-sized avatar
:octocat:
Erlang Developer Experience @ WhatsApp

Roberto Aloi robertoaloi

:octocat:
Erlang Developer Experience @ WhatsApp
View GitHub Profile
@dszoboszlay
dszoboszlay / perftest.erl
Last active August 30, 2021 10:46
Small utility for comparing the time to execute various Erlang functions
-module(perftest).
-export([test/1, test/2]).
-define(SCHEDULER_REDUCTIONS_LIMIT, 2000).
-define(MIN_INNER_LOOPS, 50).
-define(STOP_OUTER_MSG, stop_outer_loop).
-define(EMPTY_LOOP, "empty loop").
test(Fs) ->
test(Fs, timer:seconds(1)).