comp.lang.ada
 help / color / mirror / Atom feed
From: "Dan'l Miller" <optikos@verizon.net>
Subject: Re: Visibility of Indexing aspects
Date: Fri, 3 Aug 2018 14:32:41 -0700 (PDT)
Date: 2018-08-03T14:32:41-07:00	[thread overview]
Message-ID: <cc25c794-5986-4f6e-9d5e-0ec20a4f47d0@googlegroups.com> (raw)
In-Reply-To: <pk2fiq$2nq$1@franka.jacob-sparre.dk>

On Friday, August 3, 2018 at 3:56:59 PM UTC-5, Randy Brukardt wrote:
> "Dan'l Miller" <optikos@verizon.net> wrote in message 
> news:dc0f1491-0e8c-43c5-a78f-e32d59df5f03@googlegroups.com...
> On Thursday, August 2, 2018 at 3:31:18 PM UTC-5, Randy Brukardt wrote:
> ...
> >> My point is that a programmer that truly cares about performance (and
> >> hopefully that will only be concerning in a few critical situations) 
> >> would
> >> avoid using Reference at all if there isn't a need to update-in-place 
> >> part
> >> of the element. That is, one would still use the underlying operations, 
> >> but
> >> individually rather than all automatically as part of a set.
> 
> >In the above-mentioned case of prohibiting 4 of the 5, the programmer
> >seeks not performance improvement.
> 
> Better programmers don't worry about performance all of the time, but 
> *everyone* has to worry about it some of the time.
> 
> >The programmer seeks proscribing the retention of certain* data and
> >structure by the outside-of-this-package world-topics which the
> >outside-of-this-package world has no business retaining or using directly
> >or abusing, ...
> 
> This is an utterly false statement; there is plenty of reasons to use the 
> various parts directly; specifically for improved performance. Almost 
> everything used in the indexing operations previously existed in the Ada 
> 2005 version of the container, after all.
> 
> So, since you're starting with a pair of fallicies, the rest of what you 
> have to say is irrelevant. ("if False then anything" is a true [and useless] 
> statement.)
> 
>                                             Randy.

Ummmmmmmmm, what is so incredibly “expensive” about Element => Self.Data(Index)'Access in OP?  You seem to be making some sort of gross inefficiency point, but the core piece of this conversation is OP's seminal-referent library •forcing• the usage of only Element => Self.Data(Index)'Access, which is in effect ‘give me the von Neumann address of an element in the array (as an alias)’.  I am a little confused how obtaining the von Neumann address of an element in an array causes gross inefficiency; it seems like such a straight-forward lightweight operation:  an integer calculated by mere garden-variety pointer arithmetic of base-address plus offset.

I am a little confused how even the “(as an alias)” part causes gross inefficiency in execution time expended.  It might complicate drastically the •release• of the array by not easily knowing when all of the elements have been de-aliased, but when to late-release the array is not a gross inefficiency of execution time expended; it is mere delay in time pessimistically until certainty has been reached that all the aliases' lifetimes have ended.  But even that meticulous lifetime tracking seems trivial:  reference count the number of aliases-to-elements anywhere in the array; don't dealloc the entire array until the alias-lifetime reference count returns to zero.


  reply	other threads:[~2018-08-03 21:32 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02 20:31 Visibility of Indexing aspects Randy Brukardt
2018-08-03  0:43 ` Dan'l Miller
2018-08-03 20:56   ` Randy Brukardt
2018-08-03 21:32     ` Dan'l Miller [this message]
2018-08-06 21:46       ` Randy Brukardt
2018-08-06 22:12         ` Dmitry A. Kazakov
2018-08-07 15:13         ` Dan'l Miller
2018-08-07 22:41           ` Randy Brukardt
  -- strict thread matches above, loose matches on Subject: below --
2018-07-14 14:18 Jere
2018-07-14 17:04 ` Shark8
2018-07-14 18:29   ` Jere
2018-07-14 18:41     ` Dmitry A. Kazakov
2018-07-14 23:00     ` Shark8
2018-07-14 23:28       ` Jere
2018-07-15 14:41 ` AdaMagica
2018-07-15 15:33   ` Jere
2018-07-16  3:22     ` AdaMagica
2018-07-17  0:35       ` Jere
2018-07-17  9:46         ` AdaMagica
2018-07-17 10:11           ` AdaMagica
2018-07-20 12:08             ` Jere
2018-07-20 16:11               ` AdaMagica
2018-07-20 22:03                 ` Dan'l Miller
2018-07-20 22:07                 ` Jere
2018-07-21 10:33                   ` AdaMagica
2018-07-24  3:32                   ` Randy Brukardt
2018-07-24 17:15                     ` Dan'l Miller
2018-07-25  5:37                       ` Randy Brukardt
2018-07-25 18:26                         ` Dan'l Miller
2018-07-25 19:58                           ` AdaMagica
2018-07-25 20:57                             ` Dan'l Miller
2018-07-26  0:12                               ` Randy Brukardt
2018-07-26  2:41                                 ` Dan'l Miller
2018-07-26 19:09                                   ` Randy Brukardt
2018-07-26 20:31                                 ` Shark8
2018-07-26 21:25                                   ` Dan'l Miller
2018-07-27 22:05                                     ` Randy Brukardt
2018-07-28  0:35                                       ` Dan'l Miller
2018-07-27 21:58                                   ` Randy Brukardt
2018-07-20 22:23                 ` Jere
2018-07-20 22:25                   ` Jere
2018-07-21  5:58                   ` J-P. Rosen
replies disabled

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