Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
29athrowaway
· 12mo ago · 0 comments
Except when you chain many collection operations... then it breaks horribly.
Comments
[–]
tbct
12mo ago
Can you elaborate on what you're referring to? I can see performance becoming a problem if you repeatedly chain non-optimisable (in bytecode) as excluding the in place operations I believe all ops re-allocate the collection.
[–]
neko-kai
12mo ago
Just use `.iterator` before chaining and the final collection will only be allocated once.
[–]
ATMLOTTOBEER
12mo ago
Ignore that person they don’t know what they’re talking about lol