Closed MostAwesomeDude closed 5 years ago
Well, the massive speed boost part is hard, but the feature itself is not, is it? Maybe make the hard part its own ticket?
FYI the change from .diverge()
to .diverge(Int)
in the montstone benchmark is worth a 4.8x slowdown.
I made a ticket for the hard part #202
I suggest closing this. Well done!
E has a very nice feature where guards can be passed to
.diverge/0
, forming a.diverge(guard)
(or.diverge(keyGuard, valueGuard)
for maps) idiom. As expected, the guard is used to coerce elements of the collection when they are inserted.In addition to the obvious benefits, there is a massive speed boost waiting for us if we use collection strategies to speed up certain common situations like
l.diverge(Int)
by unboxing elements internally. This may require getting hands dirty with the JIT.