bwlewis/irlba

`right.only=T` is a memory hog

vspinu opened this issue · 3 comments

I have a matrix dgCMatrix of about 1.8GB with 20mil columns and I need just right vectors, so I tried right.only=T but it turned out to be both considerably less efficient and much more memory greedy than right.only=F .

By looking at the code I see that fastpath is bypassed in this case and work dimesion is artificially inchreased by 20 here. This basically creates the V matrix of almost 7GB in my case and eventually blows up on my 16GB laptop.

I guess right.only is intended for n>>p case then those extra 20 column don't matter. In my case it's the other way around. Thus, maybe an appropriate fix would be to simply document this in the rigth_only argument documentation.

Sorry about the long latency.

Yes! The increase in work is to guard against loss of accuracy. You've stated the use case well, limit it to n>>p cases (designed for the when the right vectors are small). I will update the doc as you suggest.

OK to close this?

Yes. Thank you!