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

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

[Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-va


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration
Date: Thu, 19 May 2022 13:58:37 -0400 (EDT)

Follow-up Comment #15, bug #62468 (project octave):

regarding my previous question - so intmax ~ 2.1e9 . calling something silly
like:


tic;a = integral(@(x) repelem(x,5e8), 1, 1,'arrayvalued',true);toc
Elapsed time is 5.079442 seconds.
>> tic;a = integral(@(x) repelem(x,intmax), 1, 1,'arrayvalued',true);toc
Error using repelem
Requested 1x5000000000 (37.3GB) array exceeds maximum array size
preference (15.9GB). This might cause MATLAB to become
unresponsive.

Error in @(x)repelem(x,5e9)
...
>> tic;a = integral(@(x) repelem(x,intmax-5e8), 1, 1,'arrayvalued',true);toc
Elapsed time is 56.228911 seconds.


while in octave, 

tic;quadgkv(@(x) repelems(x,[1;5000000]), 1, 1);toc
Elapsed time is 43.6698 seconds.


(profiler shows most time spent in __quadgkv_eval_array__)
didn't take it up any higher, and my system can just barely fit an intmax
sized double array anyway.  I had just been wondering if octave's linear
indexing limit would be a problem anywhere, but seems performance limits will
hit first.



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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