[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sandy Bridge
From: |
Graaf_van_Vlaanderen |
Subject: |
Sandy Bridge |
Date: |
Sat, 20 Oct 2012 02:08:39 -0700 (PDT) |
I was just wondering, how well is GNU Octave compiled to recent CPU
architectures?
When running the script below, my CPU simply remains running at the lowest
speed: 1.6GHz.
In fact 'turbo mode' should kick in and the CPU should run at 3.8GHz, but it
doesn't.
When I trigger the CPU with another program, the script runs twice as fast.
Is there a solution for this problem?
CPU: i7-2600k
Linux Kernel: 3.5.0-17
Gnu Octave: 3.6.4-rc0
runs=3;
% (5)
cumulate = 0; p = 0; vt = 0; vr = 0; vrt = 0; rvt = 0; RV = 0; j = 0; k = 0;
x2 = 0; R = 0; Rxx = 0; Ryy = 0; Rxy = 0; Ryx = 0; Rvmax = 0; f = 0;
for i = 1:runs
x = abs(randn(100,100));
tic;
% Calculation of Escoufier's equivalent vectors
p = size(x, 2);
vt = [1:p]; % Variables to test
vr = []; % Result: ordered variables
RV = [1:p]; % Result: correlations
for j = 1:p % loop on the variable number
Rvmax = 0;
for k = 1:(p-j+1) % loop on the variables
if j == 1
x2 = [x, x(:, vt(k))];
else
x2 = [x, x(:, vr), x(:, vt(k))]; % New table to test
end
R = corr(x2); % Correlations table
Ryy = R(1:p, 1:p);
Rxx = R(p+1:p+j, p+1:p+j);
Rxy = R(p+1:p+j, 1:p);
Ryx = Rxy';
rvt = trace(Ryx*Rxy)/((trace(Ryy^2)*trace(Rxx^2))^0.5); % RV
calculation
if rvt > Rvmax
Rvmax = rvt; % test of RV
vrt(j) = vt(k); % temporary held variable
end
end
vr(j) = vrt(j); % Result: variable
RV(j) = Rvmax; % Result: correlation
f = find(vt~=vr(j)); % identify the held variable
vt = vt(f); % reidentify variables to
test
end
timing = toc;
cumulate = cumulate + timing;
end
times(5, 3) = timing;
disp(['Escoufier''s method on a 100x100 matrix (mixed)________ (sec): '
num2str(timing)])
clear x; clear p; clear vt; clear vr; clear vrt; clear rvt; clear RV; clear
j; clear k;
clear x2; clear R; clear Rxx; clear Ryy; clear Rxy; clear Ryx; clear Rvmax;
clear f;
--
View this message in context:
http://octave.1599824.n4.nabble.com/Sandy-Bridge-tp4645524.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Sandy Bridge,
Graaf_van_Vlaanderen <=