$ the-wire · showcase
Elixir trims Enum.reverse_slice/3 work, fixes Date.from_gregorian_days/2
By RepoJournal · Filed · About Elixir & Phoenix · Composed from the cited sources · methodology
Two Elixir internals fixes landed: Enum.reverse_slice/3 stops walking list tails it does not touch, and Date.from_gregorian_days/2 passes a valid day fraction to from_iso_days/2.
Fix Date.from_gregorian_days/2 (#15940) elixir-lang/elixir
Date.from_gregorian_days/2 was passing {days, 0} to from_iso_days/2, an invalid day fraction that Calendar.ISO silently ignores; it now passes {0, 86_400}. Only code running non-Calendar.ISO calendars ever saw the error, so those callers are the ones to retest.
Avoid traversing untouched tails in Enum.reverse_slice/3 (#15938) elixir-lang/elixir
The slice walk now goes through the prefix and the selected range directly, returns the input unchanged for zero- and one-element reversals, and reuses the untouched suffix instead of reversing and counting the whole list. The commit adds boundary and single-enumeration tests alongside the rewrite.
Avoid traversing untouched tails in Enum.reverse_slice/3 elixir-lang/elixir
The author's own notes on the change say it is faster in most cases and uses less memory, with tradeoffs, and the PR ships a Benchee benchmark script for reproducing the numbers.
Fix Date.from_gregorian_days/2 elixir-lang/elixir
A duplicate of the Date.from_gregorian_days/2 fix reported through the PR thread, carrying the same before/after: {days, 0} in, {0, 86_400} out.