LWN.net Logo

matrix multiply optimization

matrix multiply optimization

Posted Oct 27, 2007 21:55 UTC (Sat) by bartoldeman (subscriber, #4205)
In reply to: matrix multiply optimization by giraffedata
Parent article: Memory part 5: What programmers can do

Because transposition uses O(N^2) accesses and multiplication O(N^3). The accesses in the
transposition are more expensive but there are N times fewer than in the multiplication...


(Log in to post comments)

matrix multiply optimization

Posted Oct 27, 2007 22:41 UTC (Sat) by giraffedata (subscriber, #1954) [Link]

Aha. Perfectly clear now. The article neglects to explain this; I'd probably say, "the original traverses mul2 in this expensive nonsequential way 1000 times, whereas the improved version does it only once."

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.