You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Ted Dunning (JIRA)" <ji...@apache.org> on 2010/09/08 19:58:34 UTC

[jira] Created: (MAHOUT-497) Matrix get/set causes allocation (?!)

Matrix get/set causes allocation (?!)
-------------------------------------

                 Key: MAHOUT-497
                 URL: https://issues.apache.org/jira/browse/MAHOUT-497
             Project: Mahout
          Issue Type: Bug
            Reporter: Ted Dunning


Matrix get and set check the array bounds.  But checking the array bounds calls size.  But size allocates a small integer
array.

This is evil and KILLs performance.

The first fix is to avoid this in SGD based classifiers.  Second will be a real change to the matrix routines to avoid the allocation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-497) Matrix get/set causes allocation (?!)

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907450#action_12907450 ] 

Hudson commented on MAHOUT-497:
-------------------------------

Integrated in Mahout-Quality #263 (See [https://hudson.apache.org/hudson/job/Mahout-Quality/263/])
    

> Matrix get/set causes allocation (?!)
> -------------------------------------
>
>                 Key: MAHOUT-497
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-497
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>             Fix For: 0.4
>
>
> Matrix get and set check the array bounds.  But checking the array bounds calls size.  But size allocates a small integer
> array.
> This is evil and KILLs performance.
> The first fix is to avoid this in SGD based classifiers.  Second will be a real change to the matrix routines to avoid the allocation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-497) Matrix get/set causes allocation (?!)

Posted by "Jonathan Young (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907381#action_12907381 ] 

Jonathan Young commented on MAHOUT-497:
---------------------------------------

Are you planning on creating the integer array once, by adding int[] cardinality to AbstractMatrix, or did you have another solution in mind?

> Matrix get/set causes allocation (?!)
> -------------------------------------
>
>                 Key: MAHOUT-497
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-497
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>
> Matrix get and set check the array bounds.  But checking the array bounds calls size.  But size allocates a small integer
> array.
> This is evil and KILLs performance.
> The first fix is to avoid this in SGD based classifiers.  Second will be a real change to the matrix routines to avoid the allocation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-497) Matrix get/set causes allocation (?!)

Posted by "Ted Dunning (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907389#action_12907389 ] 

Ted Dunning commented on MAHOUT-497:
------------------------------------


I just committed a change that allocates once, adding cardinality to AM and adding rowSize() and columnSize() to Matrix pretty much in 
line with what you suggest.  That the code was ever otherwise was just something that I wouldn't have believed until a profiler stuffed
it into my face.

> Matrix get/set causes allocation (?!)
> -------------------------------------
>
>                 Key: MAHOUT-497
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-497
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>
> Matrix get and set check the array bounds.  But checking the array bounds calls size.  But size allocates a small integer
> array.
> This is evil and KILLs performance.
> The first fix is to avoid this in SGD based classifiers.  Second will be a real change to the matrix routines to avoid the allocation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MAHOUT-497) Matrix get/set causes allocation (?!)

Posted by "Ted Dunning (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Dunning resolved MAHOUT-497.
--------------------------------

    Fix Version/s: 0.4
       Resolution: Fixed

Committed a pretty simple fix.

> Matrix get/set causes allocation (?!)
> -------------------------------------
>
>                 Key: MAHOUT-497
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-497
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>             Fix For: 0.4
>
>
> Matrix get and set check the array bounds.  But checking the array bounds calls size.  But size allocates a small integer
> array.
> This is evil and KILLs performance.
> The first fix is to avoid this in SGD based classifiers.  Second will be a real change to the matrix routines to avoid the allocation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.