comp.lang.ada
 help / color / mirror / Atom feed
From: anon@att.net
Subject: Re: An optimizing compiler idea
Date: Fri, 4 Jul 2014 22:26:59 +0000 (UTC)
Date: 2014-07-04T22:26:59+00:00	[thread overview]
Message-ID: <lp79ni$76o$1@speranza.aioe.org> (raw)
In-Reply-To: lp6m9q$lu0$1@speranza.aioe.org

This concept has been used around since the begining Ada 83.  


In <lp6m9q$lu0$1@speranza.aioe.org>, Victor Porton <porton@narod.ru> writes:
>In this post I ask whether my idea is not new and already implemented. And 
>also I suggest to implement it in Ada compilers.
>
>I propose not to store an array bound if it is constant (1 in the example 
>below).
>
>This can be used to create container types which could be more efficient 
>than plain arrays.
>
>Below is a toy container type giving an example of my idea:
>
>package Test is
>
>   type Test_Array_Type is array(Integer range <>) of Float;
>   
>   type Test_Record(Size: Integer) is
>      record
>         Test_Array: Test_Array_Type(1..Size);
>      end record;
>
>end;
>
>In this example we can store only one (upper) index of an array. Thus it 
>could be faster and more memory efficient than plain array with a range of 
>two indexes.
>
>-- 
>Victor Porton - http://portonvictor.org



      reply	other threads:[~2014-07-04 22:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04 16:55 An optimizing compiler idea Victor Porton
2014-07-04 22:26 ` anon [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox