3 ms·
Are you sure they're not stores in contiguous memory? Q features a crazy number of optimizations for special cases. I would imagine a dense representation of re
by smabie 6y ago
Are you sure they're not stores in contiguous memory? Q features a crazy number of optimizations for special cases. I would imagine a dense representation of rectangular nested lists is one of them. Q code uses flip (flips a list) and requires it to be rectangular. Moreover, I highly highly doubt column vectors are stored as a bunch of pointers to a single element list. I just can't imagine Whitney ever tolerating such obvious inefficiency.
Looking at the link, Q is only 10% slower for big matrices. I can't imagine this being possible without major optimization on q's part since lapack is insanely optimized.