Speed of Matrix-Multiplication (in Matlab, C, other PCs)
Mostrar comentarios más antiguos
I'm working on an object detection algorithm ( HOG ). Their (paper-guys) tool is written in C and needs "less than a second [for] 4000 detection windows".
I use Matlab. After optimizing my code for speed, the biggest 'time sink' (80% cpu time) is a matrix-multiplication (it is the linear kernel of a SVM classification). I striped it down to:
nF = 3780; % number of features
nV = 3120; % number of support vectors
V = rand(nV,nF); % support vectors
N = 5000;
S = rand(N,nF);
tic
K = V * S'; % Elapsed time is ~2 seconds.
toc
The matrix-multiplication takes 2sec (where the paperguys do it in 1sec). I tried mex'ing it, but that takes 35% longer. I tried parallel computing with splitting S, but also took much longer.
Now my questions are about explanation and understanding this: How much faster is a matrix multiplication like this in C? How much influence has the PC spec? I guess it is impossible to speedup a matrix multiplication in Matlab?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Kernel Creation from MATLAB Code en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!