Benchmarking More Seq Traversal Idioms in Scala

2 thoughts on “Benchmarking More Seq Traversal Idioms in Scala”

  1. If your looping a lot of items, maybe your doing something wrong. You could consider using parallel collections and applying a function to the parallel collection, if you don’t need the results of the previous calculation.

    The idea I’m trying to suggest is that we are working in a fairly high level most of the time, if we are looping a thousand items then maybe we are just doing the algorithm in a wrong way.

    If you really need to loop so many items, maybe a library that already exists can do what you want in a more efficient way. This is the JVM, there are so many libraries.

    Although, I agree – it would be nice if it was faster anyway.

    1. Good point. To be clear we don’t have Seqs of 10k or 100k items though we do spend a lot of time in going over a few 10s or 100s of items. We do our parallelism at the actor level so for us, parallel collections are less interesting.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s