Lookup functions via metaprogramming vs ETS?

Depends how often you call it. We had some performance problems with initializing 10k DateTime maps from Timex.to_datetime with a timezone. Because it had to do timezone lookups in ets.

They use for that a library tzdata which had an old version using compiled in solution and new solution was ets table.

Performance issues · Issue #31 · lau/tzdata · GitHub see performance difference.