You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2014/08/02 02:13:38 UTC
[jira] [Commented] (SPARK-2799) Simplify some Scala operations for
clarity, performance
[ https://issues.apache.org/jira/browse/SPARK-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14083227#comment-14083227 ]
Apache Spark commented on SPARK-2799:
-------------------------------------
User 'srowen' has created a pull request for this issue:
https://github.com/apache/spark/pull/1728
> Simplify some Scala operations for clarity, performance
> -------------------------------------------------------
>
> Key: SPARK-2799
> URL: https://issues.apache.org/jira/browse/SPARK-2799
> Project: Spark
> Issue Type: Improvement
> Components: Examples, GraphX, Spark Core, Streaming
> Affects Versions: 1.0.1
> Reporter: Sean Owen
> Priority: Minor
>
> For fun, here's a last minor suggestion for consideration before the 1.1 window closes.
> There are a number of instances where Scala operations can be simplified, for clarity or even performance.
> For example getOrElse(null) can be orNull. filter(...).size can be faster as count(...). An expression like "!...someLongChain...isEmpty" can be "... .nonEmpty". And so on.
> These are from code inspections. The PR will show the changes broken down by type in separate commits. They should be quite safe.
--
This message was sent by Atlassian JIRA
(v6.2#6252)