From: Georg Bauhaus <bauhaus@arcor.de>
Subject: Re: Q: compiler generated timing checks
Date: Tue, 06 Feb 2007 23:45:32 +0100
Date: 2007-02-06T23:44:41+01:00 [thread overview]
Message-ID: <1170801931.26019.34.camel@localhost> (raw)
In-Reply-To: <1170800847.26019.30.camel@localhost>
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.
prev parent reply other threads:[~2007-02-06 22:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-06 22:27 Q: compiler generated timing checks Georg Bauhaus
2007-02-06 22:45 ` Georg Bauhaus [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox