You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Josh Rosen (JIRA)" <ji...@apache.org> on 2015/07/28 08:22:04 UTC

[jira] [Created] (SPARK-9399) Assorted micro-optimizations in PythonRDD

Josh Rosen created SPARK-9399:
---------------------------------

             Summary: 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org