Change data storage to files#461
Conversation
|
@vbrazo So, I wondered if we could move the data passed in the functions to a file, which would improve the reading of the modules. I would be down to change everything if it gets accepted 👍. |
vbrazo
left a comment
There was a problem hiding this comment.
Could you please provide benchmarks to show if this approach is faster than the current one?
I'd also like to get an opinion from @igas or @anthonator on this PR.
|
So, I made some changes after running the benchmark as I found out that my solution was a bit slower. After my optimization, this was the result. What do you think @vbrazo ? |
e604590 to
2a9a44e
Compare
d7214bb to
24d0b82
Compare
|
This would make contributing to Faker much easier! 🙏 |
| count = Enum.count(data) | ||
|
|
||
| mapped_data = | ||
| data |> Enum.with_index() |> Enum.into(%{}, fn {k, v} -> {v, k} end) |> Macro.escape() |
There was a problem hiding this comment.
Should call transform_into_map, right? @laraujo7

I've added: