Github user rxin commented on the pull request:
https://github.com/apache/spark/pull/860#issuecomment-45015385
I don't think there would be any perf issues with this, but might be good
to do a perf run to see if there are any perf penalty.
There are possibly two perf downsides: 1. contention on lazy val's lock,
and 2 the extra branch. However, I think in this case the iterator is consumed
by a single thread, so the JVM can get rid of the lock, and branch prediction
should work well for the extra branch ...
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---