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

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

[Octave-bug-tracker] [bug #64882] Slow to pass arrays out of mexFunction


From: anonymous
Subject: [Octave-bug-tracker] [bug #64882] Slow to pass arrays out of mexFunction
Date: Sat, 11 Nov 2023 08:59:19 -0500 (EST)

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

                 Summary: Slow to pass arrays out of mexFunction
                   Group: GNU Octave
               Submitter: None
               Submitted: Sat 11 Nov 2023 01:59:17 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 8.3.0
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sat 11 Nov 2023 01:59:17 PM UTC By: Anonymous
Passing a large array out of a mexFunction seems to take an extremely long
time. I couldn't get very far figuring out what is happening but it may be
related to "mutable" and making deep copies of mxArray types into native
Octave types. It's strange because passing large (Octave type) array into a
mexFunction doesn't incur the same penalty.

I wonder if this could be improved, even just for a few standard types
(numeric arrays).

Attached is a small example which receives a large array and returns a large
array of the same size.

>> mex TestFunc.cpp
>> A=rand(20000);
>> tic;B=TestFunc(A);toc

*In Octave:*
Entered      : Elapsed time is 0.000358105 seconds.
Parsed args  : Elapsed time is 0.000403166 seconds.
Created array: Elapsed time is 1.82221 seconds.
Elapsed time is 4.34962 seconds.

*In Matlab:*
Entered      : Elapsed time is 0.002034 seconds.
Parsed args  : Elapsed time is 0.002162 seconds.
Created array: Elapsed time is 0.002450 seconds.
Elapsed time is 0.002602 seconds.








    _______________________________________________________
File Attachments:


-------------------------------------------------------
Date: Sat 11 Nov 2023 01:59:17 PM UTC  Name: TestFunc.cpp  Size: 651B   By:
None

<http://savannah.gnu.org/bugs/download.php?file_id=55318>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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