×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Why matlab is fast in matrix multiplication

Why matlab is fast in matrix multiplication

Why matlab is fast in matrix multiplication

(OP)
Does anybody know how matlab handle the matrix multiplication? I tested with 2 200-square matrices(elements are from uniform distribution of (0,1) and found out the calculation times as follows:
matlab : 0.016    
fortran: 0.425    
VC     : 0.195    
VB     : 1.998
The speed is so fast. it must have used some memory optimization. Anybody know some detail about this?

Thx

RE: Why matlab is fast in matrix multiplication

Matlab was specifically written as a "matrix laboratory", so one would hope that it was fast at manipulating matrices.

As for speed, presumably, the Matlab code is both optimized and possibly written in assembler.

Unless you were the optimizer, it's unlikely that you're comparing apples to apples.  One critical optimization is to make sure that matrix indexing occurs quickly,  going against the grain can sloooooow down matrix math substantially.

TTFN

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources