Tuesday, November 20, 2018

Scala Tuple2Zipped vs IterableLike zip

What's the difference between the two implementations? Is one better than the other.

There is a blog post that says that Tuple2Zipped performances better, but it doesn't provide a reason, and looking at the source code I don't see the difference.



val l1 = List(1,2,3)
val l2 = List(5,6,7)

val v1 = l1 zip l2
val v2 = (l1, l2).zipped

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...