|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 1666 (0x682)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
with Instrument;
use Instrument;
------------------
-- Parameterless Call
------------------
-- This test evaluates the efficiency of a call to a procedure that has
-- no formal parameters.
-- The parameterless procedure Inner is used in the procedure call and
-- when executed assigns a value to a local variable, which is then
-- assigned to the global variable. In the test version Inner is called
-- twice, while in the noise version one of the calls is replaced by
-- identical assignments (Lets) to a local and the global variable. The
-- additional call to Inner ensures that the compiler does not eliminate
-- Inner from the noise version as a part of dead code optimization.
-- Similarly, the local variable Outer_Local is referenced in the test
-- version to preclude its elimination.
procedure Nppca2 is
package Ps_Cs is new Procs (Integer);
use Ps_Cs;
Outer_Local : T;
procedure Inner is
Inner_Local : T;
begin
Let (Inner_Local, Ident (Init));
Let (Global, Ident (Inner_Local));
end Inner;
begin
Start ("NPPCA2", "No Parameter Procedure Call (Test)");
for I in 1 .. 10000 loop
Let (Outer_Local, Ident (Init));
Inner; -- called in both versions
Let (Global, Ident (Outer_Local));
Inner; -- included in test version
Let (Outer_Local, Ident (Init)); -- in both versions
-- Let(Global, Ident(Global)); -- included in control version
-- Let(Global, Ident(Outer_Local)); -- included in control version
end loop;
Stop;
end Nppca2;