octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #10222] interpreter: Object pool for scala


From: John W. Eaton
Subject: [Octave-patch-tracker] [patch #10222] interpreter: Object pool for scalars and stack frames
Date: Tue, 28 Feb 2023 11:07:28 -0500 (EST)

Follow-up Comment #2, patch #10222 (project octave):

This change was also posted in patch #10160 with the following info in the
original submission:


I have made a patch that adds an object pool for octave_base_scalar and
its derived classes, to decrease malloc and free usage.

Code like:


    function i = foo ()
            tic;
            for i = 1:100000
                    i = 1+2+3+4+5+6+7;
            end
            toc;
    end


has a speed increase of about 13% on my machine and the amount of mallocs
decreases from 1,1 million to 440 000.

The patch works fine on my x64 Debian machine, but should probably be tested
on a Windows build, because C++ thread_local support is kinda quirky.

The object pool size is set to 8, but could probably be tuned somewhat.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?10222>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]