WICHTIG: Der Betrieb von goMatlab.de wird privat finanziert fortgesetzt. - Mehr Infos...

Mein MATLAB Forum - goMatlab.de

Mein MATLAB Forum

 
Gast > Registrieren       Autologin?   

Partner:




Forum
      Option
[Erweitert]
  • Diese Seite per Mail weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

MATLAB Benchmark

 

netzwerg
Forum-Newbie

Forum-Newbie


Beiträge: 2
Anmeldedatum: 01.07.18
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 01.07.2018, 17:35     Titel: MATLAB Benchmark
  Antworten mit Zitat      
Bei mir steht der Kauf eines neuen PC an, und da wollte ich mal kurz fragen, ob es euch möglich ist, mal kurz folgendes Benchmark laufen zu lassen und das Ergebnis zu posten.

Das Benchmark macht einige lineare Algebra Operationen und Faktorisierungen für unterschiedlichen Matrizengrößen und misst die Zeit.

Wäre cool, wenn ihr auch euren Prozessor nennen könnt.

Code:

for N=[10, 100, 1000, 2500, 5000, 7500, 10000]
    if N<100
        N_mult = 1000;
    elseif N<5001
        N_mult = 100;
    else
        N_mult = 10;
    end
    fprintf('N = %d: ', N);

    rng(1);
    A = rand(N);
    B = rand(N);
    A_pd = A*A';

    tic;
    svd(A);
    t_svd = toc;
    fprintf('SVD ');

    tic;
    chol(A_pd);
    t_chol = toc;
    fprintf('Chol ');

    tic;
    qr(A);
    t_qr = toc;
    fprintf('QR ');

    tic;
    for k=1:N_mult
        A*B;
    end
    t_mult = toc;
    fprintf('%d mult ', N_mult);

    tic;
    inv(A);
    t_inv = toc;
    fprintf('Inv ');

    tic;
    pinv(A);
    t_pinv = toc;
    fprintf('Pinv\n\n');

    fprintf('ZEIT IN SEKUNDEN (GROESSE: %d):\n', N);
    fprintf('SVD: %f\n', t_svd);
    fprintf('Cholesky: %f\n', t_chol);
    fprintf('QR: %f\n', t_qr);
    fprintf('%d Matrix Produkte: %f\n', N_mult, t_mult);
    fprintf('Inverse: %f\n', t_inv);
    fprintf('Pseudo-inverse: %f\n\n', t_pinv);
end
 
Private Nachricht senden Benutzer-Profile anzeigen


ol1v3r
Forum-Anfänger

Forum-Anfänger


Beiträge: 27
Anmeldedatum: 06.07.18
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 06.07.2018, 15:55     Titel:
  Antworten mit Zitat      
Mein Ergebnis mit einem Intel Core i7-4800MQ CPU:
Code:
N = 10: SVD Chol QR 1000 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 10):
SVD: 0.010284
Cholesky: 0.004264
QR: 0.003616
1000 Matrix Produkte: 0.001682
Inverse: 0.003639
Pseudo-inverse: 0.016504

N = 100: SVD Chol QR 100 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 100):
SVD: 0.006530
Cholesky: 0.000301
QR: 0.003691
100 Matrix Produkte: 0.004529
Inverse: 0.011174
Pseudo-inverse: 0.010115

N = 1000: SVD Chol QR 100 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 1000):
SVD: 0.165287
Cholesky: 0.011942
QR: 0.026169
100 Matrix Produkte: 2.811885
Inverse: 0.046357
Pseudo-inverse: 0.378979

N = 2500: SVD Chol QR 100 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 2500):
SVD: 4.815085
Cholesky: 0.061940
QR: 0.237846
100 Matrix Produkte: 31.888657
Inverse: 0.417798
Pseudo-inverse: 7.359325

N = 5000: SVD Chol QR 100 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 5000):
SVD: 43.637176
Cholesky: 0.536719
QR: 2.465166
100 Matrix Produkte: 283.866575
Inverse: 3.209492
Pseudo-inverse: 60.187676

N = 7500: SVD Chol QR 10 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 7500):
SVD: 137.942573
Cholesky: 1.528059
QR: 6.792201
10 Matrix Produkte: 91.381479
Inverse: 10.650270
Pseudo-inverse: 188.970752

N = 10000: SVD Chol QR 10 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 10000):
SVD: 323.568623
Cholesky: 3.570827
QR: 16.352291
10 Matrix Produkte: 209.716184
Inverse: 24.814592
Pseudo-inverse: 450.101137

_________________

Viele Grüße
Ol1v3r
Smile
Private Nachricht senden Benutzer-Profile anzeigen
 
netzwerg
Themenstarter

Forum-Newbie

Forum-Newbie


Beiträge: 2
Anmeldedatum: 01.07.18
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 06.07.2018, 17:30     Titel:
  Antworten mit Zitat      
Intel Core i7 5500U:

Code:
N = 10: SVD Chol QR 1000 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 10):
SVD: 0.043910
Cholesky: 0.006824
QR: 0.006230
1000 Matrix Produkte: 0.006863
Inverse: 0.004865
Pseudo-inverse: 0.038642

N = 100: SVD Chol QR 100 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 100):
SVD: 0.003482
Cholesky: 0.000406
QR: 0.003389
100 Matrix Produkte: 0.018671
Inverse: 0.009451
Pseudo-inverse: 0.010867

N = 1000: SVD Chol QR 100 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 1000):
SVD: 0.489843
Cholesky: 0.012253
QR: 0.052690
100 Matrix Produkte: 4.520033
Inverse: 0.061340
Pseudo-inverse: 0.604394

N = 2500: SVD Chol QR 100 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 2500):
SVD: 6.089425
Cholesky: 0.117907
QR: 0.493148
100 Matrix Produkte: 68.858117
Inverse: 0.820797
Pseudo-inverse: 10.289406

N = 5000: SVD Chol QR 100 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 5000):
SVD: 54.236677
Cholesky: 1.264801
QR: 5.341659
100 Matrix Produkte: 524.986693
Inverse: 5.480641
Pseudo-inverse: 71.798360

N = 7500: SVD Chol QR 10 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 7500):
SVD: 160.620782
Cholesky: 2.876770
QR: 12.734938
10 Matrix Produkte: 160.313061
Inverse: 18.073953
Pseudo-inverse: 235.020614

N = 10000: SVD Chol QR 10 mult Inv Pinv

ZEIT IN SEKUNDEN (GROESSE: 10000):
SVD: 378.207283
Cholesky: 6.602820
QR: 31.778981
10 Matrix Produkte: 377.639701
Inverse: 41.527685
Pseudo-inverse: 553.470508
Private Nachricht senden Benutzer-Profile anzeigen
 
Neues Thema eröffnen Neue Antwort erstellen



Einstellungen und Berechtigungen
Beiträge der letzten Zeit anzeigen:

Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen
.





 Impressum  | Nutzungsbedingungen  | Datenschutz | FAQ | goMatlab RSS Button RSS

Hosted by:


Copyright © 2007 - 2024 goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks

MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.