[ 
https://issues.apache.org/jira/browse/SPARK-9399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14643921#comment-14643921
 ] 

Apache Spark commented on SPARK-9399:
-------------------------------------

User 'JoshRosen' has created a pull request for this issue:
https://github.com/apache/spark/pull/7719

> Assorted micro-optimizations in PythonRDD
> -----------------------------------------
>
>                 Key: SPARK-9399
>                 URL: https://issues.apache.org/jira/browse/SPARK-9399
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark
>            Reporter: Josh Rosen
>            Assignee: Josh Rosen
>            Priority: Minor
>
> There are a few minor optimizations in PythonRDD which may avoid garbage 
> creation or Scala overheads:
> - Replace a foreach() loop with a while() loop.
> - Returns nulls instead of Options to avoid allocating an Option once per 
> read() call.
> - Call .size() instead of .length(), thereby avoiding an implicit Java -> 
> Scala collections conversion.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to