Re: Efficiently splitting a stream 3 ways

2017-01-09 Thread C B
On Jan 9, 2017 3:41 PM, "Aljoscha Krettek" wrote: > I think the split/select variant should be a bit faster because it creates > less object copies internally. It should also be more future proof because > it will benefit from improvements (if any) in the way split/select works. > > There is also

Re: Efficiently splitting a stream 3 ways

2017-01-09 Thread Aljoscha Krettek
I think the split/select variant should be a bit faster because it creates less object copies internally. It should also be more future proof because it will benefit from improvements (if any) in the way split/select works. There is also some ongoing work in adding support for side outputs which a

Efficiently splitting a stream 3 ways

2016-12-22 Thread Lawrence Wagerfield
Hi, I'd like to know which is more efficient: splitting a stream 3 ways via `split` or via `filter`? --- FILTER -- val greater = stream.filter(_.n > 0) val less = stream.filter(_.n < 0) val equal = stream.filter(_.n == 0) - - VS - --- SPLIT --- val split = stream.split(