diff options
author | DB Tsai <dbtsai@alpinenow.com> | 2014-10-29 10:14:53 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2014-10-29 10:14:53 -0700 |
commit | 51ce997355465fc5c29d0e49b92f9bae0bab90ed (patch) | |
tree | d6c2b06140d87641b7b5ee56a2d4dccd7a7eb11a /data | |
parent | 1559495dd961d299299a27aae2cb940e8c6697c5 (diff) | |
download | spark-51ce997355465fc5c29d0e49b92f9bae0bab90ed.tar.gz spark-51ce997355465fc5c29d0e49b92f9bae0bab90ed.tar.bz2 spark-51ce997355465fc5c29d0e49b92f9bae0bab90ed.zip |
[SPARK-4129][MLlib] Performance tuning in MultivariateOnlineSummarizer
In MultivariateOnlineSummarizer, breeze's activeIterator is used
to loop through the nonZero elements in the vector. However,
activeIterator doesn't perform well due to lots of overhead.
In this PR, native while loop is used for both DenseVector and SparseVector.
The benchmark result with 20 executors using mnist8m dataset:
Before:
DenseVector: 48.2 seconds
SparseVector: 16.3 seconds
After:
DenseVector: 17.8 seconds
SparseVector: 11.2 seconds
Since MultivariateOnlineSummarizer is used in several places,
the overall performance gain in mllib library will be significant with this PR.
Author: DB Tsai <dbtsai@alpinenow.com>
Closes #2992 from dbtsai/SPARK-4129 and squashes the following commits:
b99db6c [DB Tsai] fixed java.lang.ArrayIndexOutOfBoundsException
2b5e882 [DB Tsai] small refactoring
ebe3e74 [DB Tsai] First commit
Diffstat (limited to 'data')
0 files changed, 0 insertions, 0 deletions