From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Intervention needed? Date: Tue, 19 Mar 2019 17:21:37 -0500 Organization: JSA Research & Innovation Message-ID: References: <6e1977a5-701e-4b4f-a937-a1b89d9127f0@googlegroups.com> <6f9ea847-2903-48c8-9afc-930201f2765a@googlegroups.com> Injection-Date: Tue, 19 Mar 2019 22:21:38 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="11338"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:55900 Date: 2019-03-19T17:21:37-05:00 List-Id: "Optikos" wrote in message news:aa13d9dd-69e9-48ac-99d0-3fabef216781@googlegroups.com... ... > A container could have (as a required fundamental axiom) a singly-linked >list of spirits of all cursors ever created that reference it. Matt suggested such an implementation when the containers were designed. But only for deep testing, because... >As each cursor's life ends, that dying cursor directly knows O(1) where its >spirit is within that linked list, and then removes its dying spirit too. This means that each cursor has to be controlled (explicitly or with something that is effectively the same), and that means that cursor operations are going to be much more expensive. Particularly operations that return cursors from functions. (Those are probably 10x slower.) And since iterations are built on a bunch of such functions, it too would be much slower. I don't think anyone would accept the Ada containers if they are intentionally that slow by design. (The place where that was true in Ada 2012 has spawned a lot of revision in Ada 2020, it would be madness to put it back somewhere else.) Randy.