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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1a6555c7f36c101c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.karotte.org!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Q: compiler generated timing checks From: Georg Bauhaus In-Reply-To: <1170800847.26019.30.camel@localhost> References: <1170800847.26019.30.camel@localhost> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1170801931.26019.34.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Date: Tue, 06 Feb 2007 23:45:32 +0100 NNTP-Posting-Date: 06 Feb 2007 23:44:41 CET NNTP-Posting-Host: ac4b2227.newsspool4.arcor-online.net X-Trace: DXC=>i3QfoYLm`D@k=MdN::NBI4IUK On Tue, 2007-02-06 at 23:27 +0100, Georg Bauhaus wrote: > procedure compute(X: in out T); > -- uses a weird algorithm in "TIME(3 * X**2)" and "SPACE(X*log(X))" > > pragma Complexity > (Space, > On => compute, > Order => Square, > Input => (1 => X), > Factor => (1 => 1)); > > pragma Complexity > (Time, > On => compute, > Order => N_Log_N, > Input => (1 => 10_000), -- should be magic_of(X)? > Factor => (1 => 3)); > > end Tempus_Fugit; > --- foo.ada 2007-02-06 23:37:03.000000000 +0100 +++ foo-new.ada 2007-02-06 23:38:49.000000000 +0100 @@ -11,14 +11,14 @@ pragma Complexity (Space, On => compute, - Order => Square, + Order => N_Log_N, Input => (1 => X), Factor => (1 => 1)); pragma Complexity (Time, On => compute, - Order => N_Log_N, + Order => Square, Input => (1 => 10_000), -- should be magic_of(X)? Factor => (1 => 3)); Sorry.