commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christoph Dibak (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-1389) Runtime Improvement for getSubMatrix in Array2DRowRealMatrix
Date Mon, 10 Oct 2016 16:24:20 GMT

    [ https://issues.apache.org/jira/browse/MATH-1389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15562728#comment-15562728
] 

Christoph Dibak commented on MATH-1389:
---------------------------------------

I got for the current master

Benchmark                  (size)  Mode  Cnt     Score     Error  Units
MatrixBenchmark.submatrix       1  avgt    5    80.266 ?  29.050  us/op
MatrixBenchmark.submatrix       2  avgt    5   101.748 ?  43.520  us/op
MatrixBenchmark.submatrix       5  avgt    5   192.395 ? 154.029  us/op
MatrixBenchmark.submatrix      10  avgt    5   323.002 ?  91.892  us/op
MatrixBenchmark.submatrix      20  avgt    5   635.714 ? 169.283  us/op
MatrixBenchmark.submatrix      30  avgt    5  1272.193 ? 342.419  us/op
MatrixBenchmark.submatrix      40  avgt    5  1917.473 ? 537.948  us/op


And for my patched version

Benchmark                  (size)  Mode  Cnt     Score     Error  Units
MatrixBenchmark.submatrix       1  avgt    5    77.156 ?  33.102  us/op
MatrixBenchmark.submatrix       2  avgt    5   100.613 ?  52.541  us/op
MatrixBenchmark.submatrix       5  avgt    5   142.334 ?   6.235  us/op
MatrixBenchmark.submatrix      10  avgt    5   280.540 ?  45.896  us/op
MatrixBenchmark.submatrix      20  avgt    5   642.904 ? 290.280  us/op
MatrixBenchmark.submatrix      30  avgt    5  1117.553 ? 189.211  us/op
MatrixBenchmark.submatrix      40  avgt    5  1818.474 ? 800.511  us/op


I'll stick to my patched version, as mobile apps will run in "cold" scenarios.  However, I
can totally understand if you do not want to apply this patch, as it does not save too much
for "warmed up" scenarios.

> Runtime Improvement for getSubMatrix in Array2DRowRealMatrix
> ------------------------------------------------------------
>
>                 Key: MATH-1389
>                 URL: https://issues.apache.org/jira/browse/MATH-1389
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Christoph Dibak
>            Priority: Trivial
>         Attachments: 0001-faster-getSubMatrix-for-Array2DRowRealMatrix.patch, MatrixBenchmark.java,
RuntimeTestGetSubMatrix.java
>
>
> Using System.arraycopy() for creating sub-matrices in the getSubMatrix() method of Array2DRowRealMatrix
improves the runtime.  Tested for a matrix with dimension 50x50, the execution time was 16
times faster.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message