Re: [elixir-core:10586] Proposal: Map.split_with/2

2021-12-14 Thread José Valim
TL;DR - pull request is welcome. My initial take was that the performance benefits are not significant but then, after carefully checking the Enum API, I realized that my slippery-slope argument does not hold: there aren't any other functions, as far as I can tell, that would make sense to be

Re: [elixir-core:10586] Proposal: Map.split_with/2

2021-12-13 Thread Chris Miller
Of course some numbers would be great to look at here - here is a benchmark for an implementation of Map.split_with/2 comparing the results agains a few implementations using the current standard library Code ```elixir defmodule SplitWith do def test do map = Map.new(0..1000, fn n -> {n,