I finally tested this in Docker the results were strange, File.ls is still 
faster but not by as much.

iex(20)> fn -> Enum.each(0..500, fn _ -> File.ls("lib/utils") end) end |> 
:timer.tc |> elem(0) |> Kernel./(1_000_000)

1.05333

iex(21)> fn -> Enum.each(0..500, fn _ -> :os.cmd('ls lib/utils') |> 
to_string() |> String.split("\n") end) end |> :timer.tc |> elem(0) |> 
Kernel./(1_000_000)

2.819828

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/6f38d772-e24c-4101-bd37-70478d0a777c%40googlegroups.com.

Reply via email to