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

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

[Octave-bug-tracker] [bug #65200] Special nil octave_base_value class to


From: Petter
Subject: [Octave-bug-tracker] [bug #65200] Special nil octave_base_value class to speed up octave_value dtors
Date: Tue, 23 Jan 2024 17:40:19 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?65200>

                 Summary: Special nil octave_base_value class to speed up
octave_value dtors
                   Group: GNU Octave
               Submitter: petter
               Submitted: Tue 23 Jan 2024 10:40:19 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Performance
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 23 Jan 2024 10:40:19 PM UTC By: Petter <petter>
This patch adds a special nil octave_base_value class with the sole purpose of
having an initial m_count of 2, to avoid needing to check for the nil_rep() in
octave_value dtors.

(The nil value is in file scope and can't be deleted.)

A loop like:

  for i = 1:n
    2 + i;
  end

executes in 10% fewer instructions according to callgrind.

I'll post the patches in a follow up post to get the bug nr.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65200>

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




reply via email to

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