HyukjinKwon commented on pull request #29114:
URL: https://github.com/apache/spark/pull/29114#issuecomment-659363180


   I just did a very quick test. Seems like if your function to serialize is 
big, it can benefit best from it up to 1250%:
   
   ```python
   >>> from pyspark import cloudpickle
   >>> import timeit
   >>> x = list(range(10000000))
   >>> def bigfunc(a):
   ...     b = x
   ...     return a
   ...
   >>> timeit.timeit(lambda: spark.range(1).rdd.map(bigfunc).count(), number=1)
   ```
   
   **Before:**
   
   16.589810816000004 (sec)
   
   **After:**
   
   1.3231475199999991 (sec)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to