On Sunday, 21 June 2015 09:36:28 UTC+1, Tony Kelman wrote:
>
>
> One thing that might be interesting to do, if you really need the matrix 
> to be CSR once it's in Python, would be to compare Julia's sparse transpose 
> to scipy's.
>

Interestingly, the times are comparable even though Julia takes *a lot* 
more memory to carry out the transpose. 

Test 1: size 100^2
# @time C1 = B', 
elapsed time: 0.001505153 seconds (1047912 bytes allocated)
elapsed time: 0.00070354 seconds (1034064 bytes allocated)
elapsed time: 0.00062364 seconds (1034064 bytes allocated)
# @time C2 = B_py_csc[:tocsr]()
elapsed time: 0.001275592 seconds (1872 bytes allocated)
elapsed time: 0.000731662 seconds (1824 bytes allocated)
elapsed time: 0.000783181 seconds (1824 bytes allocated) 

 Test 1: size 500^2
# @time C1 = B', 
elapsed time: 0.017294795 seconds (25982312 bytes allocated)
elapsed time: 0.077717563 seconds (25968464 bytes allocated, 84.20% gc time)
elapsed time: 0.009692984 seconds (25968464 bytes allocated)
# @time C2 = B_py_csc[:tocsr]()
elapsed time: 0.019015223 seconds (1872 bytes allocated)
elapsed time: 0.016385235 seconds (1824 bytes allocated)
elapsed time: 0.016601521 seconds (1824 bytes allocated)


Reply via email to