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

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

[Octave-patch-tracker] [patch #10362] Fix problem with trivial ranges in


From: Petter T.
Subject: [Octave-patch-tracker] [patch #10362] Fix problem with trivial ranges in VM
Date: Tue, 18 Jul 2023 18:48:06 -0400 (EDT)

Follow-up Comment #7, patch #10362 (project octave):

'Instead, could we handle "EXP : EXP" and "EXP : EXP : EXP" as special cases
in the interpreter instead of creating range objects?  Then it seems to me
that we could handle integer base, increment, and limit values in FOR loops
without needing the special data type.'

Construct like this one bellow maybe lead to problems with memory allocation
if there is no lazy range object?


function foo
  for a = some_range()
  end
end

function r = some_range
  r = 1:1e9;
end


'Again, I encourage you to not focus so much on these kinds of issues until
the bytecode interpreter is fully functional.'

Ye I agree. This patch is a bugfix and I explained why "trivial range" was
done in the first place, i.e. for performance reasons.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?10362>

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




reply via email to

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