[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57805] Some array permutations are much slowe
From: |
Marco Caliari |
Subject: |
[Octave-bug-tracker] [bug #57805] Some array permutations are much slower than others |
Date: |
Thu, 13 Feb 2020 07:51:42 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0 |
URL:
<https://savannah.gnu.org/bugs/?57805>
Summary: Some array permutations are much slower than others
Project: GNU Octave
Submitted by: caliari
Submitted on: Thu 13 Feb 2020 12:51:40 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: 5.1.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
Dear all,
the following code
n = 500;
X = randn (100, 100, 100);
P = perms(1:3);
for i = 1:5
P(i,:)
tic
for k = 1:1000
permute (X, P(i,:));
end
t(i) = toc
end
average = mean (t)
variance = var (t)
gives me an average elapsed time of 1.5 seconds with a variance of 0.3 seconds
in octave (with the first permutation much slower than the others), while an
average elapsed time of 1.0 with a variance of 0.03 in matlab (with
-singleCompThread, otherwise it is multithreaded and even faster). Is it a
desired feature to have permute much faster for some permutations?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57805>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #57805] Some array permutations are much slower than others,
Marco Caliari <=