[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58445] significant slow down in stable versio
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #58445] significant slow down in stable version for cellfun invocations which use function handles |
Date: |
Sun, 28 Jan 2024 12:32:55 -0500 (EST) |
Follow-up Comment #14, bug#58445 (group octave):
Somehow we left this regression alone for 3 years, but the slowdown is still
there.
I wrote another small test before re-discovering this bug report. The code is
attached.
N = 1e5;
C = {magic(2), magic(3), magic(4), magic(5)};
tic;
for i = 1:N
n = cellfun (@numel, C);
end
printf ('Time for cellfun (@numel, C) : %f\n', toc);
tic;
for i = 1:N
n = cellfun ("numel", C);
end
printf ('Time for cellfun ("numel", C) : %f\n', toc);
Results are
Time for cellfun (@numel, C) : 0.705530
Time for cellfun ("numel", C) : 0.202134
Still a significant slowdown for "accelerated" function names.
(file #55632)
_______________________________________________________
Additional Item Attachment:
File name: bm_cellfun_handle.m Size:0 KB
<https://file.savannah.gnu.org/file/bm_cellfun_handle.m?file_id=55632>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://git.savannah.nongnu.org/cgit/administration/savane.git/snapshot/savane-fab6a498be17545b049f2ffbe43e58c5a946615e.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58445>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #58445] significant slow down in stable version for cellfun invocations which use function handles,
Rik <=