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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f316de357ae35e9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-26 11:53:14 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: FAQ and string functions Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Mon, 26 Aug 2002 18:52:43 GMT References: <20020730093206.A8550@videoproject.kiev.ua> <4519e058.0207300548.15eeb65c@posting.google.com> <20020731104643.C1083@videoproject.kiev.ua> <4519e058.0208010629.5e6182ca@posting.google.com> <20020801194720.Q1080@videoproject.kiev.ua> <4519e058.0208020605.5ab7e092@posting.google.com> <3D4AAF63.72782659@san.rr.com> <3D4B2382.7030209@telepath.com> <3D4B2ACD.FDA29B9A@san.rr.com> <3D4B401E.3060802@telepath.com> <3D4B4477.500088B@san.rr.com> <3D4EA1AC.80D17170@s NNTP-Posting-Host: shell01.theworld.com Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: archiver1.google.com comp.lang.ada:28426 Date: 2002-08-26T18:52:43+00:00 List-Id: "Chad R. Meiners" writes: > "Robert A Duff" wrote in message > news:wccd6s5y09r.fsf@shell01.TheWorld.com... > > Not necessarily: > > > > procedure P(X: String) is > > Y: String_Ptr := new String'(1..X'Length); > > begin > > Y.all := X; -- How fast is this? > > > > The amount of data copied is probably a run-time calculated value (not > > "easily visible in the source"), and is different for each call to P. > > In fact, one call to P might take a million times longer than another. > > Yes, but the time bound on the assignment is blatantly visible; thus your > "Not necessarily" doesn't hold for this example. It's not blatantly visible to me. Please explain. Unless you mean that it copies at most Integer'Last bytes, which is not a very *useful* bound. More to the point, this time bound is very different from the time bound for ":=" on, say, Integers. Yet both use the same ":=" notation. - Bob