patchGNU Octave - Patches: patch #10160, interpreter: Object pool for...

 
 

patch #10160: interpreter: Object pool for scalars

Submitter:  Petter <petter>
Submitted:  Sat 11 Dec 2021 01:29:08 AM UTC
   
 
Category:  Core : new feature Priority:  5 - Normal
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 28 Feb 2023 04:05:18 PM UTC, comment #1: 

This change appears to be the same as patch #10222.  Closing this one and referencing it in patch #10222.

John W. Eaton <jwe>
Group administrator
Sat 11 Dec 2021 01:29:08 AM UTC, original submission:  

Hi!

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.

Petter <petter>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #52507:  objpool.patch added by petter (13KiB - text/x-patch - Attached wrong patch in 52500 that called wrong delete)
file #52500:  objpool.patch added by petter (13KiB - text/x-patch - Updated patch with pool closing and pools for stack frames)
file #52481:  objpool.patch added by petter (7KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by petter (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-02-28 jwe StatusNone Duplicate
        Open/ClosedOpen Closed
    2021-12-15 petter Attached File- Added objpool.patch, #52507
    2021-12-13 petter Attached File- Added objpool.patch, #52500
    2021-12-11 petter Attached File- Added objpool.patch, #52481

    Back to the top

    Powered by Savane 3.13-54b4.
    Corresponding source code