Something better than Enum.any?

Have a look at :binary.match/2 and :binary.compile_pattern/1. If the list changes infrequently (relative to the frequency of matches) you’ll benefit greatly from a compiled pattern.

There was some discussion in various places about VM optimizations recently, e.g.:

1 Like