hissssst / tria

Elixir optimizing compiler
GNU General Public License v3.0
55 stars 2 forks source link

Enum.count comparison optimisation #11

Open H8rsbeware opened 1 year ago

H8rsbeware commented 1 year ago

As mentioned on Elixir Forum

Logical comparisons like Enum.count(x) > y could exit out when count of x exceeds y. potentially saving huge amounts of time with larger collections, or be changed to Enum.count_until(x, y) by the compiler.

P.s. I dont create many issue reports, hopefully my formatting is ok :)