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

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

[Octave-bug-tracker] [bug #58564] classdef instance field access painful


From: Rik
Subject: [Octave-bug-tracker] [bug #58564] classdef instance field access painfully slow vs. struct field access
Date: Mon, 15 Jun 2020 16:16:56 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Update of bug #58564 (project octave):

                  Status:                    None => Confirmed              
                 Release:                   5.2.0 => dev                    
        Operating System:       Microsoft Windows => Any                    

    _______________________________________________________

Follow-up Comment #1:

Confirmed.  I change the Operating System to Any because I was able to
reproduce this on Linux as well.

Here are the results from the stable branch that is about to become Octave
version 6.1.


octave:1> field_access_timing
struct: obj.field access time = 1.181 usec 
struct: obj.('field') access time = 1.869 usec
struct: subsref(obj,struct) access time = 6.431 usec

value_class: obj.field access time = 5.897 usec 
value_class: obj.('field') access time = 5.543 usec
value_class: subsref(obj,struct) access time = 11.797 usec

handle_class: obj.field access time = 7.304 usec 
handle_class: obj.('field') access time = 6.718 usec
handle_class: subsref(obj,struct) access time = 14.590 usec


And here are the results from the development branch that will eventually
become Octave 7.1.


octave:1> field_access_timing
struct: obj.field access time = 1.238 usec 
struct: obj.('field') access time = 1.669 usec
struct: subsref(obj,struct) access time = 5.740 usec

value_class: obj.field access time = 5.025 usec 
value_class: obj.('field') access time = 5.353 usec
value_class: subsref(obj,struct) access time = 10.455 usec

handle_class: obj.field access time = 6.176 usec 
handle_class: obj.('field') access time = 7.538 usec
handle_class: subsref(obj,struct) access time = 14.024 usec


Results are all generally reflective of the same behavior from Octave 5.2
which is that struct access is quick, while class access is slow.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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