bugGNU Octave - Bugs: bug #64614, Ranges space saving feature works...

 
 

bug #64614: Ranges space saving feature works only for double but not for singles or not even for integers

Submitter:  None
Submitted:  Thu 31 Aug 2023 05:47:15 AM UTC
   
 
Category:  Interpreter Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Wont Fix Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 8.3.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 12 Sep 2023 08:01:09 PM UTC, comment #3: 

Thanks @mmuetzel. Closing as Won't Fix since the expected direction is to remove ranges entirely for simpler code. Space-saving was worth it in the past when storage was limited, but at this point the benefits of simpler code to maintain outweigh the space saved.

Arun Giridhar <arungiridhar>
Group Member
Sat 02 Sep 2023 09:09:35 AM UTC, comment #2: 

IIRC, there were experiments for this feature during the development cycle of Octave 7. But finally it was decided that the possible gain would not justify the additional complexity.
That experiment basically ended with the following change before Octave 7 was released:
https://hg.savannah.gnu.org/hgweb/octave/rev/2989202f92f8

Chances are probably very low for this to get implemented (again).
It's actually more likely that ranges will get dropped entirely at some point in the future.

I'm lowering priority. But feel free to close.

Markus Mützel <mmuetzel>
Group administrator
Fri 01 Sep 2023 07:41:47 PM UTC, comment #1: 

What does Matlab do for the same code?

Arun Giridhar <arungiridhar>
Group Member
Thu 31 Aug 2023 05:47:15 AM UTC, original submission:  

Ranges are a convenient and space saving way to write a vector with evenly spaced elements.

Or this space saving way ONLY works for double, not for floats and not (even) for integers.

Example:

if optimize_range ()
  printf("Range is space saving optimized.\n");
else
  printf("Range is NOT space saving optimized.\n");
endif
Range_Double = double(1):double(100);
Range_Single = single(1):single(100);
Range_int64 = int64(1):int64(100);
Range_uint64 = uint64(1):uint64(100);
Range_int8 = int8(1):int8(100);
Range_uint8 = uint8(1):uint8(100);

whos


-->


Range is space saving optimized.
Variables visible from the current scope:

variables in scope: top scope

  Attr   Name              Size                     Bytes  Class
  ====   ====              ====                     =====  =====
         Range_Double      1x100                       24  double
         Range_Single      1x100                      400  single
         Range_int64       1x100                      800  int64
         Range_int8        1x100                      100  int8
         Range_uint64      1x100                      800  uint64
         Range_uint8       1x100                      100  uint8

Total is 600 elements using 2224 bytes

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by arungiridhar (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-09-12 arungiridhar StatusNone Wont Fix
        Open/ClosedOpen Closed
    2023-09-02 mmuetzel CategoryNone Interpreter
        Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
        Item GroupNone Feature Request
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-04b1.
    Corresponding source code