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

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

[Octave-bug-tracker] [bug #56752] Performance slowdown from version 3.2.


From: Carlo de Falco
Subject: [Octave-bug-tracker] [bug #56752] Performance slowdown from version 3.2.4 through to current dev branch
Date: Tue, 10 Sep 2019 10:00:14 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:69.0) Gecko/20100101 Firefox/69.0

Follow-up Comment #37, bug #56752 (project octave):

I recently posted the changeset 

file #47475

on the mailing list thread from which this ticket was generated.

The changeset was motivated by a "-Wreturn-std-move" warning given by clang++
when compiling tril.cc.

The rationale behind the changeset is that returning a derived 
type instead of just an Array<> object causes a copy that the
compiler does not seem to be able to optimize away.

As the use of the NoAlias<Array<>> wrapper is not really useful in the
particular case being addressed by the changeset, the trivial solution is to
just avoid the creation of NoAlias<Array<>> altogether.

file #47476

Addresses instead a similar but not identical case occurring in Sparse.cc
here the NoAlias<Array<>> template was actually useful to make access to
array
elements faster.

The solution adopted in file #47476 is to avoid NoAlias<Array<>> and use the
Array<T>::xelem() method directly, but someone may think of a better or more 
elegant solution in this case.

Posting the patches here so they don't get forgotten/lost.






(file #47476)
    _______________________________________________________

Additional Item Attachment:

File name: patch.txt                      Size:0 KB
    <https://savannah.gnu.org/file/patch.txt?file_id=47476>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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