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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e6c9800e35ccfeee X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: GNAT: Performance of String functions Date: 1997/07/22 Message-ID: <1997Jul22.071638.1@eisner>#1/1 X-Deja-AN: 258118762 X-Nntp-Posting-Host: eisner.decus.org References: <5r1l6e$e0h$1@ratatosk.uio.no> X-Nntp-Posting-User: KILGALLEN X-Trace: 869570210/21844 Organization: LJK Software Newsgroups: comp.lang.ada Date: 1997-07-22T00:00:00+00:00 List-Id: In article <5r1l6e$e0h$1@ratatosk.uio.no>, tarjeij@ulrik.uio.no (Tarjei Jensen) writes: > I suspect bounded strings will perform badly against a counted string > implementation because assignment of strings involves copying the entire array > whether it contains valid data or not. This makes Ada less than wonderful in > applications that involve a lot of bounded string assignments. No, it might affect particular _implementations_ of Ada, but I have read no indications that counted strings would not be a valid way of implementing bounded strings. If the Varying String datatype made quite public by DEC Pascal were used in some Ada implementation to implement bounded strings (and for all I know, it or something quite close to it is) execution should be quite efficient for strings below a certain size (ultimately one gets into page faults, cache misses and other stack-vs-heap issues). Larry Kilgallen