[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57321] Performance degradation due to memory
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #57321] Performance degradation due to memory allocation |
Date: |
Mon, 9 Dec 2019 14:52:14 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:60.9) Goanna/4.1 PaleMoon/28.2.0a1 |
Follow-up Comment #7, bug #57321 (project octave):
Following up [1] I used "bm.toeplitz"
runs = 1;
cumulate = 0; b = 0;
for i = 1:runs
b = zeros (620, 620);
tic;
for j = 1:620
for k = 1:620
b(k,j) = abs (j - k) + 1;
end
end
timing = toc;
cumulate = cumulate + timing;
end
Instead of compiling Octave I changed libstdc++ to redirect all of its small
sized "malloc" and "free" calls to the memory pool. Also because the
"thread_local" declaration is ,at least in Windows,inefficient I used a
lock-free queue instead of the vector as the internal structure of the memory
pool. The performance gain was 40% relative to Octave without memory pool.
[1] https://savannah.gnu.org/bugs/?56752
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57321>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/