MTIMESX - Fast Matrix Multiply with Multi-Dimensional Support

Beats MATLAB 300% - 400% in some cases ... really!

Download
Download

You are now following this Submission

Cite As

James Tursa (2026). MTIMESX - Fast Matrix Multiply with Multi-Dimensional Support (https://www.mathworks.com/matlabcentral/fileexchange/25977-mtimesx-fast-matrix-multiply-with-multi-dimensional-support), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Operators and Elementary Operations in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.10.0

Fixed typos in the dsyrk, dsyr2k, ssyrk, and ssyr2k BLAS function prototypes. (These typo fixes should not change any results)

Download
1.9.0

Added OpenMP support for custom code
Expanded sparse * single and sparse * nD support
Fixed (nD complex scalar)C * (nD array) bug

Download
1.8.0

Added capability for nD scalar multiplies (i.e., 1x1xN * MxKxN).
Replaced the buggy mxRealloc API routine with custom code.
Updated mtimesx_test_nd.m file.

Download
1.7.0

Fixed a bug for some of the (row vector) * (matrix) and (matrix transposed) * (column vector) operations in MATLAB mode that involved incorrect dimensions in the dgemv and sgemv calls.

Download
1.6.0

Fixed a typo in the build routine for 64-bit systems, changed -largearraydims to -largeArrayDims

Download
1.5.0

Added the multi-dimensional test routine mtimesx_test_nd.m for speed and equality tests. Added its description to the pdf file.

Download
1.4.0

Fixed a bug for empty transa or transb inputs. Now treats these the same as 'N'. Also simplified the nD singleton expansion code a bit.

Download
1.3.0

Added singleton expansion capability for multi-dimensional matrix multiplies.

Download
1.2.0

Fixed bug in scalar multiply code that was causing incorrect results & crashes.

Download
1.1.0

Fixed bug for (scalar) * (sparse) when the scalar contains an inf or NaN (in which case the zeros do not stay zero). Slight update to pdf doc.

Download
1.0.0

Download