GitHub user dbtsai opened a pull request: https://github.com/apache/spark/pull/3462
Implement the efficient vector norm The vector norm in breeze is implemented by `activeIterator` which is known to be very slow. In this PR, an efficient vector norm is implemented, and with this API, `Normalizer` has huge performance gain. Here is the benchmark against mnist8m dataset. Before DenseVector: 68.25secs SparseVector: 17.01secs With this PR DenseVector: 12.71secs SparseVector: 2.73secs You can merge this pull request into a Git repository by running: $ git pull https://github.com/AlpineNow/spark norm Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/3462.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3462 ---- commit c1a877c1ce13cd797f7cbf122acf603e6f82ecf6 Author: DB Tsai <dbt...@alpinenow.com> Date: 2014-11-26T00:50:51Z first commit ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org