From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:ac8:5bca:0:b0:3b8:6ca5:6df4 with SMTP id b10-20020ac85bca000000b003b86ca56df4mr910596qtb.18.1675375183046; Thu, 02 Feb 2023 13:59:43 -0800 (PST) X-Received: by 2002:a05:6870:c5a7:b0:163:2e2:fe39 with SMTP id ba39-20020a056870c5a700b0016302e2fe39mr483028oab.41.1675375182765; Thu, 02 Feb 2023 13:59:42 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 2 Feb 2023 13:59:42 -0800 (PST) In-Reply-To: <7779be64-573c-4701-bc2b-3b83ee141f64n@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=184.98.79.114; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG NNTP-Posting-Host: 184.98.79.114 References: <9c7cccd9-733f-49a8-b482-087ccb14b58dn@googlegroups.com> <9d25946b-99ab-433f-99db-14057ca9088fn@googlegroups.com> <7779be64-573c-4701-bc2b-3b83ee141f64n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2c00c2af-4095-4e76-b0c7-0f878465c2f8n@googlegroups.com> Subject: Re: Real_Arrays on heap with overloaded operators and clean syntax From: Jerry Injection-Date: Thu, 02 Feb 2023 21:59:43 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:64898 List-Id: > Thank you Jerry, that's true, this trick does the job indeed. Thanks. But= to be honest among us, it seems to me that the Real_Arrays library has bee= n implemented probably (note the probably) by people not targeting real wor= ld engineering / industrial applications. Examples are Finite Volume soluti= ons of semiconductor device equations, or weather prediction problems. You = cannot expect to solve these on the stack and of course ADA containers are = impractical for such computations. Possibly a library as discussed above th= at provides Real_Arrays functionality but memory allocation is done interna= lly on the heap or even on the stack if the user chooses to do so to take a= dvantage of fast stack access. But then the mechanism for changing the stac= k allocation size transparently and easily should also be provided as simpl= y as setting the memory pool in an access type.=20 >=20 > Do you agree?=20 >=20 Yes, with the minor caveat that I have no idea what I'm talking about. When I ran into this limitation a few years ago, I learned how to increase = the stack size before running my program. This helped but only a little, as= large arrays still were not accommodated. (Define "large" as anything too = big for stack expanded to OS limits.) I have never compared speed with stac= k versus heap allocation because, for me, it would serve no purpose. I can'= t just use smaller arrays in my work because large ones are too slow, if yo= u follow my drift here. The applications you mention are great but the list must be nearly endless.= My applications run towards audio signals and radar (simulation) images. Jerry