You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2019/07/25 13:01:00 UTC

[jira] [Updated] (SPARK-28421) SparseVector.apply performance optimization

     [ https://issues.apache.org/jira/browse/SPARK-28421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen updated SPARK-28421:
------------------------------
    Affects Version/s: 2.4.3
             Priority: Minor  (was: Major)
        Fix Version/s: 2.4.4

> SparseVector.apply performance optimization
> -------------------------------------------
>
>                 Key: SPARK-28421
>                 URL: https://issues.apache.org/jira/browse/SPARK-28421
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>    Affects Versions: 3.0.0, 2.4.3
>            Reporter: zhengruifeng
>            Assignee: zhengruifeng
>            Priority: Minor
>             Fix For: 2.4.4, 3.0.0
>
>
> Current impl of SparseVector.apply is inefficient:
> on each call,  breeze.linalg.SparseVector & breeze.collection.mutable.SparseArray are created internally, then binary-search is used to search the input position.
>  
> This place should be optimized like .ml.SparseMatrix, which directly use binary search, without conversion to breeze.linalg.Matrix.
>  
> I tested the performance and found that if we avoid the internal conversions, then a 2.5~5X speed up can be obtained.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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