回文章列表
作者Kyle ( 王凱ㄦ~ ;)), 信區: PTGS_98
標題MATLAB 雙核電腦加速運算 感謝彥廷學長提供!
時間2008/04/02 Wed 00:21:28
開MATLAB -> File -> Preferences -> General 的Multithread

把"Enable"...打勾  用Automatic~
--------------------------------以下為測試Code------------------------------

tic; inv(rand(5000,5000)); toc
a = rand(2000);b=rand(2000); tic; a*b;toc
a=rand(3000);b=rand(3000); tic;a./b;toc
A = rand(2500);
tic; inv(A);toc
tic; A*A;toc
-----------------------------直接Copy & Plaste-------------------------------

大家可以先不勾,先run一次看看結果再比較勾選後的結果

我用我的新筆電測試  ASUS W7S T7250雙核 2.5G-ram

不勾:
 Elapsed time is 60.542295 seconds.
 Elapsed time is 3.454804 seconds.
 Elapsed time is 0.167394 seconds.
 Elapsed time is 7.831013 seconds.
 Elapsed time is 6.270192 seconds.
>>

勾選後:
 Elapsed time is 39.576564 seconds.
 Elapsed time is 1.821982 seconds.
 Elapsed time is 0.125026 seconds.
 Elapsed time is 5.210790 seconds.
 Elapsed time is 3.444413 seconds.�試
 >>             ---------------------- 爽 !! 第一個運算快了將近2倍
============================================================================

PTT 版友用單核心電腦跑的速度:
 Elapsed time is 48.653181 seconds.
 Elapsed time is 2.729897 seconds.
 Elapsed time is 0.174289 seconds.
 Elapsed time is 6.366006 seconds.
 Elapsed time is 5.306654 seconds.


PTT 版友用四核心電腦跑的速度:
 Elapsed time is 16.867344 seconds.
 Elapsed time is 0.732153 seconds.
 Elapsed time is 0.173935 seconds.
 Elapsed time is 2.361484 seconds.
 Elapsed time is 1.404670 seconds.
                --------------------------- 買4核心的吧 =  =|


--
  Origin:  成大物治˙黃金之島  golden.twbbs.org 
  Author: Kyle59-113-58-28.dynamic.hinet.net 發表
  Modify: Kyle 於 2008/04/02 Wed 00:24:20 修改
文章選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻