mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jake Mannix (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MAHOUT-300) Solve performance issues with Vector Implementations
Date Sun, 21 Feb 2010 21:31:27 GMT

    [ https://issues.apache.org/jira/browse/MAHOUT-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836449#action_12836449
] 

Jake Mannix commented on MAHOUT-300:
------------------------------------

Running this on my laptop, with numNonzeroElements = 1000, vector cardinality 100,000, numVectors
= 100, numLoops = 100 (requires -Xmx1g).
{code}
INFO: 
BenchMarks                    DenseVector                   RandomAccessSparseVector     
SequentialAccessSparseVector  
Clone                                                                                    
                              
                              nCalls = 10000;               nCalls = 10000;              
nCalls = 10000;               
                              sumTime = 12.240903s;         sumTime = 2.40168s;          
sumTime = 2.1353s;            
                              minTime = 0.425ms;            minTime = 0.065ms;           
minTime = 0.065ms;            
                              maxTime = 96.625ms;           maxTime = 30.835ms;          
maxTime = 25.169ms;           
                              meanTime = 1.22409ms;         meanTime = 0.240168ms;       
meanTime = 0.21353ms;         
                              stdDevTime = 3.994235ms;      stdDevTime = 1.468017ms;     
stdDevTime = 1.271389ms;      
                              Speed = 816.93317 /sec        Speed = 4163.752 /sec        
Speed = 4683.1826 /sec        
                              Rate = 980.3198 MB/s          Rate = 4996.503 MB/s         
Rate = 5619.8193 MB/s         

Create (copy)                                                                            
                              
                              nCalls = 10000;               nCalls = 10000;              
nCalls = 10000;               
                              sumTime = 13.525425s;         sumTime = 1.855115s;         
sumTime = 0.662937s;          
                              minTime = 0.206ms;            minTime = 0.088ms;           
minTime = 0.015ms;            
                              maxTime = 99.047ms;           maxTime = 25.277ms;          
maxTime = 26.974ms;           
                              meanTime = 1.352542ms;        meanTime = 0.185511ms;       
meanTime = 0.066293ms;        
                              stdDevTime = 5.680836ms;      stdDevTime = 0.718719ms;     
stdDevTime = 0.364231ms;      
                              Speed = 739.34827 /sec        Speed = 5390.5015 /sec       
Speed = 15084.389 /sec        
                              Rate = 887.21796 MB/s         Rate = 6468.6016 MB/s        
Rate = 18101.268 MB/s         

Create (incrementally)                                                                   
                              
                              nCalls = 10000;               nCalls = 10000;              
nCalls = 10000;               
                              sumTime = 0.145204s;          sumTime = 0.533273s;         
sumTime = 4.398924s;          
                              minTime = 0.0ms;              minTime = 0.014ms;           
minTime = 0.338ms;            
                              maxTime = 2.874ms;            maxTime = 2.713ms;           
maxTime = 22.045ms;           
                              meanTime = 0.01452ms;         meanTime = 0.053327ms;       
meanTime = 0.439892ms;        
                              stdDevTime = 0.037578ms;      stdDevTime = 0.034625ms;     
stdDevTime = 0.29153ms;       
                              Speed = 68868.625 /sec        Speed = 18752.121 /sec       
Speed = 2273.2832 /sec        
                              Rate = 82642.35 MB/s          Rate = 22502.547 MB/s        
Rate = 2727.94 MB/s           

DotProduct                                                                               
                              
                              nCalls = 10000;               nCalls = 10000;              
nCalls = 10000;               
                              sumTime = 3.094423s;          sumTime = 1.218703s;         
sumTime = 0.378118s;          
                              minTime = 0.237ms;            minTime = 0.07ms;            
minTime = 0.025ms;            
                              maxTime = 5.995ms;            maxTime = 20.012ms;          
maxTime = 9.925ms;            
                              meanTime = 0.309442ms;        meanTime = 0.12187ms;        
meanTime = 0.037811ms;        
                              stdDevTime = 0.095079ms;      stdDevTime = 0.288768ms;     
stdDevTime = 0.1183ms;        
                              Speed = 3231.62 /sec          Speed = 8205.444 /sec        
Speed = 26446.77 /sec         
                              Rate = 3877.9443 MB/s         Rate = 9846.534 MB/s         
Rate = 31736.123 MB/s         

org.apache.mahout.common.distance.CosineDistanceMeasure                                  
                                                       
                              nCalls = 10000;               nCalls = 10000;              
nCalls = 10000;               
                              sumTime = 5.9166s;            sumTime = 2.970111s;         
sumTime = 0.812395s;          
                              minTime = 0.459ms;            minTime = 0.223ms;           
minTime = 0.037ms;            
                              maxTime = 2.295ms;            maxTime = 9.043ms;           
maxTime = 0.716ms;            
                              meanTime = 0.59166ms;         meanTime = 0.297011ms;       
meanTime = 0.081239ms;        
                              stdDevTime = 0.074413ms;      stdDevTime = 0.175312ms;     
stdDevTime = 0.025369ms;      
                              Speed = 1690.1599 /sec        Speed = 3366.8774 /sec       
Speed = 12309.282 /sec        
                              Rate = 2028.192 MB/s          Rate = 4040.2532 MB/s        
Rate = 14771.14 MB/s          

org.apache.mahout.common.distance.EuclideanDistanceMeasure                               
                                                          
                              nCalls = 10000;               nCalls = 10000;              
nCalls = 10000;               
                              sumTime = 3.43192s;           sumTime = 1.703885s;         
sumTime = 1.218073s;          
                              minTime = 0.196ms;            minTime = 0.059ms;           
minTime = 0.011ms;            
                              maxTime = 2.494ms;            maxTime = 6.272ms;           
maxTime = 3.491ms;            
                              meanTime = 0.343192ms;        meanTime = 0.170388ms;       
meanTime = 0.121807ms;        
                              stdDevTime = 0.054743ms;      stdDevTime = 0.065581ms;     
stdDevTime = 0.045384ms;      
                              Speed = 2913.8206 /sec        Speed = 5868.9404 /sec       
Speed = 8209.688 /sec         
                              Rate = 3496.585 MB/s          Rate = 7042.7285 MB/s        
Rate = 9851.627 MB/s          

org.apache.mahout.common.distance.ManhattanDistanceMeasure                               
                                                          
                              nCalls = 10000;               nCalls = 10000;              
nCalls = 10000;               
                              sumTime = 11.521895s;         sumTime = 4.10605s;          
sumTime = 9.535213s;          
                              minTime = 0.734ms;            minTime = 0.251ms;           
minTime = 0.661ms;            
                              maxTime = 20.341ms;           maxTime = 29.624ms;          
maxTime = 11.764ms;           
                              meanTime = 1.152189ms;        meanTime = 0.410605ms;       
meanTime = 0.953521ms;        
                              stdDevTime = 0.982439ms;      stdDevTime = 0.568994ms;     
stdDevTime = 0.425346ms;      
                              Speed = 867.9127 /sec         Speed = 2435.4307 /sec       
Speed = 1048.7443 /sec        
                              Rate = 1041.4954 MB/s         Rate = 2922.5168 MB/s        
Rate = 1258.4932 MB/s         

org.apache.mahout.common.distance.SquaredEuclideanDistanceMeasure                        
                                                                 
                              nCalls = 10000;               nCalls = 10000;              
nCalls = 10000;               
                              sumTime = 2.952337s;          sumTime = 1.410157s;         
sumTime = 1.138238s;          
                              minTime = 0.17ms;             minTime = 0.084ms;           
minTime = 0.011ms;            
                              maxTime = 17.479ms;           maxTime = 7.72ms;            
maxTime = 3.753ms;            
                              meanTime = 0.295233ms;        meanTime = 0.141015ms;       
meanTime = 0.113823ms;        
                              stdDevTime = 0.206201ms;      stdDevTime = 0.103339ms;     
stdDevTime = 0.053248ms;      
                              Speed = 3387.1472 /sec        Speed = 7091.4087 /sec       
Speed = 8785.509 /sec         
                              Rate = 4064.577 MB/s          Rate = 8509.69 MB/s          
Rate = 10542.611 MB/s         

org.apache.mahout.common.distance.TanimotoDistanceMeasure                                
                                                         
                              nCalls = 10000;               nCalls = 10000;              
nCalls = 10000;               
                              sumTime = 5.545072s;          sumTime = 2.58138s;          
sumTime = 1.460984s;          
                              minTime = 0.455ms;            minTime = 0.186ms;           
minTime = 0.056ms;            
                              maxTime = 17.208ms;           maxTime = 14.809ms;          
maxTime = 5.938ms;            
                              meanTime = 0.554507ms;        meanTime = 0.258138ms;       
meanTime = 0.146098ms;        
                              stdDevTime = 0.195172ms;      stdDevTime = 0.192851ms;     
stdDevTime = 0.08797ms;       
                              Speed = 1803.4031 /sec        Speed = 3873.8967 /sec       
Speed = 6844.7017 /sec        
                              Rate = 2164.0837 MB/s         Rate = 4648.6763 MB/s        
Rate = 8213.643 MB/s  
{code}        


> Solve performance issues with Vector Implementations
> ----------------------------------------------------
>
>                 Key: MAHOUT-300
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-300
>             Project: Mahout
>          Issue Type: Improvement
>    Affects Versions: 0.3
>            Reporter: Robin Anil
>             Fix For: 0.3
>
>         Attachments: MAHOUT-300.patch, MAHOUT-300.patch, MAHOUT-300.patch, MAHOUT-300.patch,
MAHOUT-300.patch
>
>
> AbstractVector operations like times
>   public Vector times(double x) {
>     Vector result = clone();
>     Iterator<Element> iter = iterateNonZero();
>     while (iter.hasNext()) {
>       Element element = iter.next();
>       int index = element.index();
>       result.setQuick(index, element.get() * x);
>     }
>     return result;
>   }
> should be implemented as follows
>  public Vector times(double x) {
>     Vector result = clone();
>     Iterator<Element> iter = result.iterateNonZero();
>     while (iter.hasNext()) {
>       Element element = iter.next();
>       element.set(element.get() * x);
>     }
>     return result;
>   }

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


Mime
View raw message