-
-
Save josevalim/bd0e82d9bfaf37599b9c to your computer and use it in GitHub Desktop.
foo from command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(foo). | |
-compile(export_all). | |
start() -> | |
List = lists:seq(1, 1000), | |
{Timer, _} = timer:tc(fun() -> | |
lists:foreach(fun(I) -> | |
Name = list_to_atom("module" ++ integer_to_list(I)), | |
{ok, Name, _} = compile:forms([{attribute, 1, module, Name}]) | |
end, List) | |
end, []), | |
io:format("Time: ~p.~n", [Timer]). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment