You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Christoph Dibak (JIRA)" <ji...@apache.org> on 2016/10/10 16:26:20 UTC

[jira] [Comment Edited] (MATH-1389) Runtime Improvement for getSubMatrix in Array2DRowRealMatrix

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

Christoph Dibak edited comment on MATH-1389 at 10/10/16 4:26 PM:
-----------------------------------------------------------------

I got for the current master

{noformat}
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
{noformat}

And for my patched version

{noformat}
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
{noformat}

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.


was (Author: dibakch):
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)