viliusk
02/19/2018, 3:22 PMcollections
.filter { it.conditionA }
.filter { it.conditionB }
.filter { it.conditionC }
performing same as
collections
.filter { it.conditionA || it.conditionB || it.conditionC }?
I wonder if 1st block will be 3x times slower or not?neworldlt
02/19/2018, 3:26 PMit.conditionA && it.conditionB && it.conditionC? 🙂Czar
02/19/2018, 3:43 PMCzar
02/19/2018, 3:45 PMviliusk
02/19/2018, 3:49 PMAndreas Sinz
02/19/2018, 4:03 PMcollections is. If its a `List<T>`you end up with 3 loops, if its a Sequence<T> you get a single looppoohbar
02/20/2018, 2:20 PMcollections will always have so few elements that the performance impact is negligible. Or maybe the bottleneck is elsewhere.