The way the information was computed was innacurate and
it would cause spurious entries in calls, leading to many
false positives. This information cannot be tracked
efficciently without slowing down the compiler, so the
caller_module has to be removed.
Matching with is_binary once is a slight performance gain, only
noticeable on long numbers. It also makes the FunctionClauseError more
clear: `** (FunctionClauseError) no function clause matching in
Integer.parse/2` vs `** (FunctionClauseError) no function clause
matching in Integer.count_digits/2`
The previous version would not terminate if
the program being invoked terminated. The
new version addresses this at the cost of
starting a background process for stdin
reading.
Closes#9171.
Otherwise if a different supervisor implementation,
such as a `ConsumerSupervisor` in GenStage, pass a
different name by accident, logging would fail.
Closes#8126.
* Remove extraneous guard from String.split
This clause makes sense for `pattern` satisfying any of the types
defined in the spec, that is `binary`, `[binary]` and `:binary.cp()`.
Furthermore the guard for `pattern` is not specified in any of the other
clauses.
Additionally, the `or` in the guard seemed a bit out of place, as this
clause (and all others) needs the `string` to be binary to work.
So let's keep just the guard to check the type of the `string` and let
the `:binary.split/3' handle the types of the `pattern`.
* Unify code path in String.split
When calling `String.split` with options `parts` and/or `trim`
explicitly set to default values, different code path was taken in
comparison to when no options were given. The alternate code path has
some performance penalties as shown below, so it's better that the
"simple" case is handled always the same way.
iex(1)> lines = for _ <- 1..1_000_000, do: "a,b"
iex(2)> :timer.tc(fn -> Enum.each(lines, &String.split(&1, ",")) end)
{2254104, :ok}
iex(3)> :timer.tc(fn -> Enum.each(lines, &String.split(&1, ",", trim: false)) end)
{61426180, :ok}