 StevePR
		
			StevePR
		
		
		
		
		
		
		
		
	
			08-28-2015 03:15 PM
I am new to the MASM (Multicore and Sparse Matrix) Toolkit.  I am impressed at the speed of the solution compared with my previous code which used a dense matrix solver.  For example, a matrix which took 93 sec to solve in dense form took only 72 msec to solve in sparse form. 
However, I now have a noticeable increase in the time required to build the matrix. To build the dense matrix took only 180 msec, but to build the sparse matrix takes 9.7 sec. Of course, I am happy to trade the 9.7 sec to build the sparse matrix for the 93 sec to solve the dense matrix. But I am wondering whether I am using the sparse VIs most efficiently. The Profile tool shows that the "Set Sparse Matrix Row (DBL).vi" requires the lion's share of the time to run my program.
I have attached a screen shot of the part of my code where I am building the matrix. Can anyone see a faster way to build the sparse matrix?
Solved! Go to Solution.
 Alexander_Sobol
		
			Alexander_Sobol08-28-2015 04:38 PM
Do not have MASM, does it have Set element function - instead of set row?
Just 4 elements per row, others are zeros if I am not mistaken.
08-29-2015 01:01 AM
Thanks Alexander_Sobolev! Good catch. Using the Set Element (4 times per loop) is about 8 - 10 times faster than using the Set Row in this application.