Hello
I have a file mkList.txt (but my mkList, have 100 lists with 100 numbers)
[[22,4,55,7..],[77,3,66,23..],[44,56,23,90..]...]
And
I need to know the time that Erlang uses to read the file list using map/sort and pmap/sort. I did this:
-module(teste).
-export([teste/1]).
-import(lists, [map/2]).
-import(lib_misc, [pmap/2]).
teste(1) ->
{ok, [Data]} = file:consult("mkList1.txt"),
{Time1, T} = timer:tc(lists, map, [fun lists:sort/1,Data]),
{Time2, R} = timer:tc(lib_misc, pmap, [fun lists:sort/1,Data]),
{Time1, T, Time2, R}.
The question is what is wrong in my code, it seems to me that is not calculating the time correctly.
Time 1 = 1
Time 2 = 1.
Could anyone help me? Thanks.