diff options
Diffstat (limited to 'app/speedtest/1986/src')
-rw-r--r-- | app/speedtest/1986/src/convert operation | 396 | ||||
-rw-r--r-- | app/speedtest/1986/src/gen.benchmark | 98 | ||||
-rw-r--r-- | app/speedtest/1986/src/integer operation | 614 | ||||
-rw-r--r-- | app/speedtest/1986/src/notice | 102 | ||||
-rw-r--r-- | app/speedtest/1986/src/real operation | 519 | ||||
-rw-r--r-- | app/speedtest/1986/src/run down logic | 429 | ||||
-rw-r--r-- | app/speedtest/1986/src/speed tester | 209 | ||||
-rw-r--r-- | app/speedtest/1986/src/text operation | 1401 |
8 files changed, 3768 insertions, 0 deletions
diff --git a/app/speedtest/1986/src/convert operation b/app/speedtest/1986/src/convert operation new file mode 100644 index 0000000..903f2e5 --- /dev/null +++ b/app/speedtest/1986/src/convert operation @@ -0,0 +1,396 @@ +PACKET convert DEFINES real to int,
+ int to real,
+ text to int,
+ int to text,
+ int to text 2,
+ real to text,
+ real to text 2,
+ code int,
+ code text :
+
+
+(***************************************************************************)
+(* *)
+(* Autor: A. Steinmann Copyright (C): HRZ - Unibi *)
+(* *)
+(***************************************************************************)
+
+
+INT VAR index,
+ first int,
+ i ;
+
+
+REAL VAR begin,
+ end,
+ act result,
+ first real ;
+
+
+TEXT VAR single text :: "*",
+ free text ;
+
+
+
+
+PROC real to int (INT CONST frequency) :
+
+ first real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ i := int (first real)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real to int s (frequency)
+
+END PROC real to int ;
+
+
+
+
+PROC real to int s (INT CONST frequency) :
+
+ first real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ i := int (first real)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("int (REAL)", act result * msec factor (frequency) - for corr)
+
+END PROC real to int s ;
+
+
+
+
+PROC int to real (INT CONST frequency) :
+
+ first int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := real (first int)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int to real s (frequency)
+
+END PROC int to real ;
+
+
+
+
+PROC int to real s (INT CONST frequency) :
+
+ first int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := real (first int)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("real (INT)", act result * msec factor (frequency) - for corr)
+
+END PROC int to real s ;
+
+
+
+
+PROC text to int (INT CONST frequency) :
+
+ free text := "1111" ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := int (free text)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text to int s (frequency)
+
+END PROC text to int ;
+
+
+
+
+PROC text to int s (INT CONST frequency) :
+
+ free text := "1111" ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := int (free text)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("int (TEXT)", act result * msec factor (frequency) - for corr)
+
+END PROC text to int s ;
+
+
+
+
+PROC int to text (INT CONST frequency) :
+
+ first int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (first int) ;
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int to text s (frequency)
+
+END PROC int to text ;
+
+
+
+
+PROC int to text s (INT CONST frequency) :
+
+ first int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (first int) ;
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("text (INT)", act result * msec factor (frequency) - for corr)
+
+END PROC int to text s ;
+
+
+
+
+PROC int to text 2 (INT CONST frequency) :
+
+ first int := 1 ;
+ i := 3 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (first int, i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int to text 2 s (frequency)
+
+END PROC int to text 2 ;
+
+
+
+
+PROC int to text 2 s (INT CONST frequency) :
+
+ first int := 1 ;
+ i := 3 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (first int, i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("text (INT, INT)", act result * msec factor (frequency) - for corr)
+
+END PROC int to text 2 s ;
+
+
+
+
+PROC real to text (INT CONST frequency) :
+
+ first real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (first real)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real to text s (frequency)
+
+END PROC real to text ;
+
+
+
+
+PROC real to text s (INT CONST frequency) :
+
+ first real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (first real)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("text (REAL)", act result * msec factor (frequency) - for corr)
+
+END PROC real to text s ;
+
+
+
+
+PROC real to text 2 (INT CONST frequency) :
+
+ first real := 1.0 ;
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (first real, i, i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real to text 2 s (frequency)
+
+END PROC real to text 2 ;
+
+
+
+
+PROC real to text 2 s (INT CONST frequency) :
+
+ first real := 1.0 ;
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (first real, i, i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("text (REAL, INT, INT)", act result * msec factor (frequency) - for corr)
+
+END PROC real to text 2 s ;
+
+
+
+
+PROC code int (INT CONST frequency) :
+
+ i := 65 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := code (i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ code int s (frequency)
+
+END PROC code int ;
+
+
+
+
+PROC code int s (INT CONST frequency) :
+
+ i := 65 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := code (i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("code (INT)", act result * msec factor (frequency) - for corr)
+
+END PROC code int s ;
+
+
+
+
+PROC code text (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := code (single text)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ code text s (frequency)
+
+END PROC code text ;
+
+
+
+
+PROC code text s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := code (single text)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("code (TEXT)", act result * msec factor (frequency) - for corr)
+
+END PROC code text s ;
+
+
+END PACKET convert ;
diff --git a/app/speedtest/1986/src/gen.benchmark b/app/speedtest/1986/src/gen.benchmark new file mode 100644 index 0000000..bb53ecc --- /dev/null +++ b/app/speedtest/1986/src/gen.benchmark @@ -0,0 +1,98 @@ +(***************************************************************************)
+(* *)
+(* Autor: A. Steinmann Copyright (C): HRZ - Unibi *)
+(* *)
+(***************************************************************************)
+
+
+LET max quantity = 99,
+ pagelength = 20 ;
+
+ROW max quantity TEXT VAR prog list ;
+
+INT VAR prog counter :: 0,
+ namelength :: 0,
+ counter,
+ storage size,
+ used storage ;
+
+
+
+PROC announce (TEXT CONST prog name) :
+
+ prog counter INCR 1 ;
+ prog list [prog counter] := prog name ;
+ IF NOT exists (prog name)
+ THEN fetch (prog name, archive)
+ FI ;
+ IF LENGTH prog name > namelength
+ THEN namelength := LENGTH prog name
+ FI ;
+
+END PROC announce ;
+
+
+
+PROC execute :
+
+ INT CONST first page :: 1,
+ last page :: (prog counter DIV pagelength) + 1 ;
+
+ INT VAR pagenumber,
+ linenumber,
+ act linenumber,
+ act first line,
+ act last line ;
+
+ FOR page number FROM first page UPTO last page
+ REP act first line := (pagenumber - 1) * pagelength + 1 ;
+ act last line := min (prog counter, pagenumber * pagelength) ;
+ FOR act line number FROM act first line UPTO act last line
+ REP display (""1""4"") ;
+ display (" Stand der Benchmark Insertierung ") ;
+ IF last page > 1
+ THEN display ("(" + text (pagenumber) + ". von " + text (last page) + " Seiten) :")
+ ELSE display (":")
+ FI ;
+ display (""13""10""13""10"") ;
+ FOR linenumber FROM act first line UPTO act last line
+ REP IF linenumber = act linenumber
+ THEN display (" " + ""15""8"" + prog list [linenumber] + ""14""8""5"")
+ ELSE display (" " + prog list [linenumber] + ""5"")
+ FI ;
+ display (""13""10"")
+ PER ;
+ display (""6"" + code (act linenumber - act first line + 2) + code (namelength + 20)) ;
+ insert (prog list [act linenumber]) ;
+ #forget (prog list [act linenumber], quiet)#
+ PER
+ PER ;
+ display (""1""4"") ;
+ display ("Insertierung abgeschlossen!") ;
+ display (""13""10"") ;
+ IF yes ("Benchmark starten")
+ THEN do ("test speed")
+ FI ;
+
+END PROC execute ;
+
+
+
+check off ;
+announce ("notice") ;
+announce ("run down logic") ;
+announce ("integer operation") ;
+announce ("real operation") ;
+announce ("text operation") ;
+announce ("convert operation") ;
+announce ("speed tester") ;
+
+
+display (""1""4"") ;
+execute ;
+release (archive) ;
+#forget ("gen.benchmark", quiet) ;#
+check on ;
+
+
+
diff --git a/app/speedtest/1986/src/integer operation b/app/speedtest/1986/src/integer operation new file mode 100644 index 0000000..90ef0f2 --- /dev/null +++ b/app/speedtest/1986/src/integer operation @@ -0,0 +1,614 @@ +PACKET integer operation DEFINES int assign global,
+ int assign local,
+ int assign param,
+ int equal,
+ int lequal,
+ int abs,
+ int min,
+ int incr,
+ row int,
+ int div,
+ int mod,
+ int add,
+ int mult :
+
+
+(***************************************************************************)
+(* *)
+(* Autor: A. Steinmann Copyright (C): HRZ - Unibi *)
+(* *)
+(***************************************************************************)
+
+
+ROW 10 INT VAR introw ;
+
+
+REAL VAR begin,
+ end,
+ act result,
+ int assign factor ;
+
+
+INT VAR first int,
+ second int,
+ third int,
+ rest,
+ i ,
+ index ;
+
+
+
+PROC int assign global (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := second int
+ END REP ;
+ end := clock (0);
+
+ act result := end - begin ;
+
+ int assign global s (frequency)
+
+END PROC int assign global ;
+
+
+
+
+PROC int assign global s (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := second int
+ END REP ;
+ end := clock (0);
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ int assign factor := act result * msec factor (frequency) - for corr ;
+
+ notice result ("INT := (Paketdaten)", int assign factor) ;
+
+END PROC int assign global s ;
+
+
+
+
+PROC int assign local (INT CONST frequency) :
+
+ INT VAR number one :: 0,
+ number two :: 1 ;
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ number one := number two
+ END REP ;
+ end := clock (0);
+
+ act result := end - begin ;
+
+ int assign local s (frequency)
+
+END PROC int assign local ;
+
+
+
+
+PROC int assign local s (INT CONST frequency) :
+
+ INT VAR number one :: 0,
+ number two :: 1 ;
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ number one := number two
+ END REP ;
+ end := clock (0);
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("INT := (Prozedurdaten)", act result * msec factor (frequency) - for corr) ;
+
+END PROC int assign local s ;
+
+
+
+
+PROC int assign param (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 1 ;
+ int assign (first int, second int, frequency) ;
+ first int := 0 ;
+ int assign s (first int, second int, frequency)
+
+END PROC int assign param ;
+
+
+
+
+PROC int assign (INT VAR one, INT CONST two, frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ one := two
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+END PROC int assign ;
+
+
+
+
+PROC int assign s (INT VAR one, INT CONST two, frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ one := two
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("INT := (Parameter)", act result * msec factor (frequency) - for corr) ;
+
+END PROC int assign s ;
+
+
+
+
+PROC row int (INT CONST frequency) :
+
+ i := 7 ;
+ int row [i] := 0 ;
+ first int := 10000 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ introw [i] := first int
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ row int s (frequency)
+
+END PROC row int ;
+
+
+
+
+PROC row int s (INT CONST frequency) :
+
+ i := 7 ;
+ int row [i] := 0 ;
+ first int := 10000 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ introw [i] := first int
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("ROW INT [i]", act result * msec factor (frequency) - for corr) ;
+
+END PROC row int s ;
+
+
+
+
+PROC int equal (INT CONST frequency) :
+
+ first int := 10 ;
+ second int := 10 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF first int = second int
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int equal s (frequency)
+
+END PROC int equal ;
+
+
+
+
+PROC int equal s (INT CONST frequency) :
+
+ first int := 10 ;
+ second int := 10 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF first int = second int
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("INT =", act result * msec factor (frequency) - for corr)
+
+END PROC int equal s ;
+
+
+
+
+PROC int lequal (INT CONST frequency) :
+
+ first int := 10 ;
+ second int := 11 ;
+ begin := clock(0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF first int <= second int
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int lequal s (frequency)
+
+END PROC int lequal ;
+
+
+
+
+PROC int lequal s (INT CONST frequency) :
+
+ first int := 10 ;
+ second int := 11 ;
+ begin := clock(0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF first int <= second int
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("INT <=", act result * msec factor (frequency) - for corr)
+
+END PROC int lequal s ;
+
+
+
+
+PROC int add (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 1 ;
+ third int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := second int + third int
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int add s (frequency)
+
+END PROC int add ;
+
+
+
+
+PROC int add s (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 1 ;
+ third int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := second int + third int
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("INT +", act result * msec factor (frequency) - for corr)
+
+END PROC int add s ;
+
+
+
+
+PROC int mult (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 99 ;
+ third int := 11 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := second int * third int
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int mult s (frequency)
+
+END PROC int mult ;
+
+
+
+
+PROC int mult s (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 99 ;
+ third int := 11 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := second int * third int
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("INT *", act result * msec factor (frequency) - for corr)
+
+END PROC int mult s ;
+
+
+
+
+PROC int div (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 10001 ;
+ third int := 99 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := second int DIV third int
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int div s (frequency)
+
+END PROC int div ;
+
+
+
+
+PROC int div s (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 10001 ;
+ third int := 99 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int := second int DIV third int
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("DIV", act result * msec factor (frequency) - for corr)
+
+END PROC int div s ;
+
+
+
+
+PROC int mod (INT CONST frequency) :
+
+ first int := 9999 ;
+ second int := 55 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ rest := first int MOD second int
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int mod s (frequency)
+
+END PROC int mod ;
+
+
+
+
+PROC int mod s (INT CONST frequency) :
+
+ first int := 9999 ;
+ second int := 55 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ rest := first int MOD second int
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("MOD", act result * msec factor (frequency) - for corr)
+
+END PROC int mod s ;
+
+
+
+
+PROC int incr (INT CONST frequency) :
+
+ first int:= 0 ;
+ second int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int INCR second int
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int incr s (frequency)
+
+END PROC int incr ;
+
+
+
+
+PROC int incr s (INT CONST frequency) :
+
+ first int:= 0 ;
+ second int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int INCR second int
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("INCR" , act result * msec factor (frequency) - for corr) ;
+
+END PROC int incr s ;
+
+
+
+
+PROC int abs (INT CONST frequency) :
+
+ first int := - 10000 ;
+ second int := 0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ second int := abs (first int)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int abs s (frequency)
+
+END PROC int abs ;
+
+
+
+
+PROC int abs s (INT CONST frequency) :
+
+ first int := - 10000 ;
+ second int := 0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ second int := abs (first int)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("abs (INT)", act result * msec factor (frequency) - for corr) ;
+
+END PROC int abs s ;
+
+
+
+
+PROC int min (INT CONST frequency) :
+
+ i := 0 ;
+ first int := 9999 ;
+ second int := 10000 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ i := min (first int, second int)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ int min s (frequency)
+
+END PROC int min ;
+
+
+
+
+PROC int min s (INT CONST frequency) :
+
+ i := 0 ;
+ first int := 9999 ;
+ second int := 10000 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ i := min (first int, second int)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("min (INT , INT)", act result * msec factor (frequency) - for corr) ;
+
+END PROC int min s ;
+
+
+END PACKET integer operation ;
diff --git a/app/speedtest/1986/src/notice b/app/speedtest/1986/src/notice new file mode 100644 index 0000000..ea1bca9 --- /dev/null +++ b/app/speedtest/1986/src/notice @@ -0,0 +1,102 @@ +PACKET notice DEFINES notice material,
+ notice heading,
+ notice operation,
+ notice result,
+ notice frequency,
+ notice runtime,
+ output mem :
+
+
+(***************************************************************************)
+(* *)
+(* Autor: A. Steinmann Copyright (C): HRZ - Unibi *)
+(* *)
+(***************************************************************************)
+
+
+FILE VAR mem ;
+
+
+
+PROC notice result (TEXT CONST operation, REAL CONST runtime) :
+
+ TEXT VAR layout :: "" ;
+
+ layout CAT (operation + (40 - LENGTH operation) * " " + text (runtime, 10, 5) + " msec") ;
+ putline (mem, layout)
+
+END PROC notice result ;
+
+
+
+PROC notice material (TEXT CONST name) :
+
+ TEXT VAR layout :: "" ;
+
+ layout CAT (" " + name) ;
+ line (mem, 4) ;
+ putline (mem, layout) ;
+ layout := " " + LENGTH name * "=" ;
+ putline (mem, layout) ;
+ line (mem, 3)
+
+END PROC notice material ;
+
+
+
+PROC notice heading (TEXT CONST name) :
+
+ TEXT VAR layout :: "" ;
+
+ layout CAT (" " + name) ;
+ line (mem,2) ;
+ putline (mem, layout) ;
+ line (mem, 1) ;
+
+ display (""6""+code(21)+code(0)) ;
+ display (""5""13"") ;
+ display (""15""+" "+name+" "+""14"")
+
+END PROC notice heading ;
+
+
+
+PROC notice frequency (INT CONST frequency 1, frequency 2) :
+
+ line (mem, 1) ;
+ put (mem, "Wiederholungsfaktor fr schnelle Operationen : "+text (frequency 1)) ;
+ line (mem, 1) ;
+ put (mem, "Wiederholungsfaktor fr langsame Operationen : "+text (frequency 2)) ;
+ line (mem, 1)
+
+END PROC notice frequency ;
+
+
+
+PROC notice operation (TEXT CONST operation) :
+
+ display(""6""+code(22)+code(0)) ;
+ display (""5""13"") ;
+ display (""15""+" "+ operation +" "+""14"") ;
+
+END PROC notice operation ;
+
+
+
+PROC notice runtime (REAL CONST runtime) :
+
+ line (mem, 3) ;
+ putline (mem, "Gesamtlaufzeit : " + text (runtime)) ;
+
+END PROC notice runtime ;
+
+
+
+PROC output mem :
+
+ mem := sequential file (output, "memory")
+
+END PROC output mem ;
+
+
+END PACKET notice ;
diff --git a/app/speedtest/1986/src/real operation b/app/speedtest/1986/src/real operation new file mode 100644 index 0000000..2d63d1b --- /dev/null +++ b/app/speedtest/1986/src/real operation @@ -0,0 +1,519 @@ +PACKET real operation DEFINES real assign,
+ row real,
+ real add,
+ real mult,
+ real div,
+ real incr,
+ real mod,
+ real equal,
+ real lequal,
+ real abs,
+ real min :
+
+
+(***************************************************************************)
+(* *)
+(* Autor: A. Steinmann Copyright (C): HRZ - Unibi *)
+(* *)
+(***************************************************************************)
+
+
+ROW 10 REAL VAR real row ;
+
+
+
+INT VAR index,
+ i ;
+
+
+REAL VAR begin,
+ end,
+ first real,
+ second real,
+ third real,
+ rest,
+ act result,
+ real assign factor ;
+
+
+
+
+PROC real assign (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := second real
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real assign s (frequency)
+
+END PROC real assign ;
+
+
+
+
+PROC real assign s (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := second real
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ real assign factor := act result * msec factor (frequency) - for corr ;
+
+ notice result ("REAL :=", real assign factor) ;
+
+END PROC real assign s ;
+
+
+
+
+PROC row real (INT CONST frequency) :
+
+ first real := 1.0 ;
+ i := 7 ;
+ real row [i] := 0.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ real row [i] := first real
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ row real s (frequency)
+
+END PROC row real ;
+
+
+
+
+PROC row real s (INT CONST frequency) :
+
+ first real := 1.0 ;
+ i := 7 ;
+ real row [i] := 0.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ real row [i] := first real
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("ROW REAL [i]", act result * msec factor (frequency) - for corr) ;
+
+END PROC row real s ;
+
+
+
+
+PROC real equal (INT CONST frequency) :
+
+ first real := 10.0 ;
+ second real := 10.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF first real = second real
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real equal s (frequency)
+
+END PROC real equal ;
+
+
+
+
+PROC real equal s (INT CONST frequency) :
+
+ first real := 10.0 ;
+ second real := 10.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF first real = second real
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("REAL =", act result * msec factor (frequency) - for corr)
+
+END PROC real equal s ;
+
+
+
+
+PROC real lequal (INT CONST frequency) :
+
+ first real := 10.0 ;
+ second real := 11.0 ;
+ begin := clock(0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF first real <= second real
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real lequal s (frequency)
+
+END PROC real lequal ;
+
+
+
+
+PROC real lequal s (INT CONST frequency) :
+
+ first real := 10.0 ;
+ second real := 11.0 ;
+ begin := clock(0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF first real <= second real
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("REAL <=", act result * msec factor (frequency) - for corr)
+
+END PROC real lequal s ;
+
+
+
+
+PROC real add (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := 1.0 ;
+ third real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := second real + third real
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real add s (frequency)
+
+END PROC real add ;
+
+
+
+
+PROC real add s (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := 1.0 ;
+ third real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := second real + third real
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("REAL +", act result * msec factor (frequency) - for corr) ;
+
+END PROC real add s ;
+
+
+
+
+PROC real mult (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := 1.001 ;
+ third real := 1.001 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := second real * third real
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real mult s (frequency)
+
+END PROC real mult ;
+
+
+
+
+PROC real mult s (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := 1.001 ;
+ third real := 1.001 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := second real * third real
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("REAL *", act result * msec factor (frequency) - for corr) ;
+
+END PROC real mult s ;
+
+
+
+
+PROC real div (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := 10000.0 ;
+ third real := 1.0001 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := second real / third real
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real div s (frequency)
+
+END PROC real div ;
+
+
+
+
+PROC real div s (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := 10000.0 ;
+ third real := 1.0001 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := second real / third real
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("REAL /", act result * msec factor (frequency) - for corr) ;
+
+END PROC real div s ;
+
+
+
+
+PROC real incr (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real INCR second real
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real incr s (frequency)
+
+END PROC real incr ;
+
+
+
+
+PROC real incr s (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real INCR second real
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("INCR", act result * msec factor (frequency) - for corr) ;
+
+END PROC real incr s ;
+
+
+
+
+PROC real mod (INT CONST frequency) :
+
+ first real := 9999.9 ;
+ second real := 21.21 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ rest := first real MOD second real
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real mod s (frequency)
+
+END PROC real mod ;
+
+
+
+
+PROC real mod s (INT CONST frequency) :
+
+ first real := 9999.9 ;
+ second real := 21.21 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ rest := first real MOD second real
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("MOD", act result * msec factor (frequency) - for corr) ;
+
+END PROC real mod s ;
+
+
+
+
+PROC real abs (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := - 12345.6 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := abs (second real)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real abs s (frequency)
+
+END PROC real abs ;
+
+
+
+
+PROC real abs s (INT CONST frequency) :
+
+ first real := 0.0 ;
+ second real := - 12345.6 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first real := abs (second real)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("abs (REAL)", act result * msec factor (frequency) - for corr) ;
+
+END PROC real abs s ;
+
+
+
+
+PROC real min (INT CONST frequency) :
+
+ first real := 10000.0 ;
+ second real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ rest := min (first real, second real)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ real min s (frequency)
+
+END PROC real min ;
+
+
+
+
+PROC real min s (INT CONST frequency) :
+
+ first real := 10000.0 ;
+ second real := 1.0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ rest := min (first real, second real)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("min (REAL, REAL)", act result * msec factor (frequency) - for corr) ;
+
+END PROC real min s ;
+
+
+END PACKET real operation ;
diff --git a/app/speedtest/1986/src/run down logic b/app/speedtest/1986/src/run down logic new file mode 100644 index 0000000..49f0f0f --- /dev/null +++ b/app/speedtest/1986/src/run down logic @@ -0,0 +1,429 @@ +PACKET run down logic DEFINES for loop,
+ msec factor,
+ for corr,
+ while loop,
+ until loop,
+ if,
+ select,
+ proc,
+ proc one param int,
+ proc two param int :
+
+
+(***************************************************************************)
+(* *)
+(* Autor: A. Steinmann Copyright (C): HRZ - Unibi *)
+(* *)
+(***************************************************************************)
+
+
+INT VAR first int,
+ second int,
+ index ;
+
+REAL VAR for loop corr,
+ begin,
+ end,
+ int incr corr,
+ act result ;
+
+BOOL VAR is initialized :: FALSE,
+ situation :: TRUE ;
+
+
+
+PROC for loop (INT CONST frequency) :
+
+ notice operation ("FOR LOOP") ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ for loop s (frequency)
+
+END PROC for loop ;
+
+
+
+PROC for loop s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ for loop corr := act result * msec factor (frequency) ;
+
+ notice result ("FOR REP",for loop corr)
+
+END PROC for loop s ;
+
+
+
+PROC initialize int incr corr (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int INCR second int
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ initialize int incr corr s (frequency)
+
+END PROC initialize int incr corr ;
+
+
+
+PROC initialize int incr corr s (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ first int INCR second int
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ int incr corr := act result * msec factor (frequency) - for corr ;
+
+END PROC initialize int incr corr s ;
+
+
+
+PROC while loop (INT CONST frequency) :
+
+ IF NOT is initialized
+ THEN initialize int incr corr (frequency)
+ FI ;
+
+ notice operation ("WHILE LOOP") ;
+ first int := 0 ;
+ second int := 1 ;
+ begin := clock (0) ;
+ WHILE first int < frequency
+ REP
+ first int INCR second int
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ while loop s (frequency)
+
+END PROC while loop ;
+
+
+
+PROC while loop s (INT CONST frequency) :
+
+ first int := 0 ;
+ second int := 1 ;
+ begin := clock (0) ;
+ WHILE first int < frequency
+ REP
+ first int INCR second int
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("WHILE REP", act result * msec factor (frequency) - int incr corr) ;
+
+END PROC while loop s ;
+
+
+
+PROC until loop (INT CONST frequency) :
+
+ IF NOT is initialized
+ THEN initialize int incr corr (frequency)
+ FI ;
+
+ notice operation ("UNTIL LOOP") ;
+ first int := 1 ;
+ second int := 1 ;
+ begin := clock (0) ;
+ REP
+ first int INCR second int
+ UNTIL first int > frequency
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ until loop s (frequency)
+
+END PROC until loop ;
+
+
+
+PROC until loop s (INT CONST frequency) :
+
+ first int := 1 ;
+ second int := 1 ;
+ begin := clock (0) ;
+ REP
+ first int INCR second int
+ UNTIL first int > frequency
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > act result
+ THEN act result := end - begin
+ FI ;
+
+ notice result("UNTIL REP", act result * msec factor (frequency) - int incr corr)
+
+END PROC until loop s ;
+
+
+
+PROC if (INT CONST frequency) :
+
+ notice operation ("IF") ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF situation
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ if s (frequency)
+
+END PROC if ;
+
+
+
+PROC if s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF situation
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("IF", act result * msec factor (frequency) - for corr) ;
+
+END PROC if s ;
+
+
+
+PROC select (INT CONST frequency) :
+
+ notice operation ("SELECT") ;
+ first int := 0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ SELECT first int OF
+ CASE 0 :
+ OTHERWISE
+ END SELECT
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ select s (frequency)
+
+END PROC select ;
+
+
+
+PROC select s (INT CONST frequency) :
+
+ first int := 0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ SELECT first int OF
+ CASE 0 :
+ OTHERWISE
+ END SELECT
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("SELECT", act result * msec factor (frequency) - for corr) ;
+
+END PROC select s ;
+
+
+
+PROC proc (INT CONST frequency) :
+
+ notice operation ("PROC") ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ nilproc
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ proc s (frequency)
+
+END PROC proc ;
+
+
+
+PROC proc s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ nilproc
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("PROC", act result * msec factor (frequency) - for corr) ;
+
+END PROC proc s ;
+
+
+
+PROC proc one param int (INT CONST frequency) :
+
+ notice operation ("PROC one param INT") ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ nilproc (first int)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ proc one param int s (frequency)
+
+END PROC proc one param int ;
+
+
+
+PROC proc one param int s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ nilproc (first int)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("PROC (INT)", act result * msec factor (frequency) - for corr) ;
+
+END PROC proc one param int s ;
+
+
+
+PROC proc two param int (INT CONST frequency) :
+
+ notice operation ("PROC two param INT") ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ nilproc (first int, second int)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ proc two param int s (frequency)
+
+END PROC proc two param int ;
+
+
+
+PROC proc two param int s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ nilproc (first int, second int)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("PROC (INT, INT)", act result * msec factor (frequency) - for corr) ;
+
+END PROC proc two param int s ;
+
+
+
+PROC nilproc :
+END PROC nilproc ;
+
+
+
+PROC nilproc (INT CONST number one) :
+END PROC nilproc ;
+
+
+
+PROC nilproc (INT CONST number one, number two) :
+END PROC nilproc ;
+
+
+
+REAL PROC for corr :
+
+ for loop corr
+
+END PROC for corr ;
+
+
+
+REAL PROC msec factor (INT CONST frequency) :
+
+ 1000.0 / real (frequency)
+
+END PROC msec factor ;
+
+
+END PACKET run down logic ;
diff --git a/app/speedtest/1986/src/speed tester b/app/speedtest/1986/src/speed tester new file mode 100644 index 0000000..37f937f --- /dev/null +++ b/app/speedtest/1986/src/speed tester @@ -0,0 +1,209 @@ +PACKET speed tester DEFINES test speed :
+
+
+(***************************************************************************)
+(* *)
+(* Autor: A. Steinmann Copyright (C): HRZ - Unibi *)
+(* *)
+(***************************************************************************)
+
+
+PROC test speed :
+
+ INT VAR frequency 1,
+ frequency 2 ;
+
+ TEXT VAR name of material,
+ name of the heart of material,
+ high,
+ low ;
+
+ REAL VAR begin,
+ end ;
+
+
+ page ;
+ cursor (1,3) ;
+ out (""15""+" EUMEL SPEED TESTER "+" "+" EUMEL SPEED TESTER "+" "+" EUMEL SPEED TESTER "+""14"") ;
+ cursor (1,6) ;
+ put ("Bitte gib Name/Typbezeichnung des Test-PC ein") ;
+ line ;
+ getline (name of material) ;
+ line ;
+ put ("Bitte gib Prozessortyp/Taktfrequenz ein") ;
+ line ;
+ getline (name of the heart of material) ;
+ line ;
+ name of material CAT " " ;
+
+ output mem ;
+ notice material (name of material + name of the heart of material) ;
+
+ REP
+ output mem ;
+ putline ("Bitte gib Genauigkeitsfaktor fuer schnelle Operationen ein") ;
+ put ("Voreingestellt ist maxint --> ") ;
+ getline (high) ;
+ line ;
+ IF high = ""
+ THEN frequency 1 := 32766
+ ELSE frequency 1 := int (high)
+ FI ;
+ putline ("Bitte gib Genauigkeitsfaktor fuer langsame Operationen ein") ;
+ put ("Voreingestellt ist maxint Div 2 --> ") ;
+ getline (low) ;
+ IF low = ""
+ THEN frequency 2 := maxint DIV 2
+ ELSE frequency 2 := int (low)
+ FI ;
+ notice frequency (frequency 1, frequency 2) ;
+
+ begin := clock (0) ;
+
+
+ test run down logic ;
+ test integer operation ;
+ test real operation ;
+ test text operation ;
+ test convert ;
+
+ end := clock (0) ;
+ page ;
+ put ("Gesamtlaufzeit : ") ;
+ put (time (end-begin)) ;
+ line (2) ;
+ put ("Taste drcken oder warten") ;
+ pause (600) ;
+
+
+ page ;
+ cursor (1,5) ;
+ out (""5""13"") ;
+ IF yes ("Ergebnis anschauen")
+ THEN edit ("memory") ;
+ page
+ FI ;
+
+ cursor (1,5) ;
+ out (""5""13"") ;
+ IF yes ("Ergebnis loeschen")
+ THEN forget ("memory",quiet)
+ FI ;
+
+ cursor (1,5) ;
+ out (""5""13"")
+ UNTIL no ("Neuer test")
+ END REP .
+
+
+test run down logic :
+
+notice heading ("Steuerkonstrukte") ;
+
+for loop (frequency 1) ;
+while loop (frequency 1) ;
+until loop (frequency 1) ;
+if (frequency 1) ;
+select (frequency 1) ;
+proc (frequency 1) ;
+proc one param int (frequency 1) ;
+proc two param int (frequency 1) .
+
+
+
+test integer operation :
+
+notice heading ("Integer Operationen") ;
+
+int assign global (frequency 1) ;
+int assign local (frequency 1) ;
+int assign param (frequency 1) ;
+row int (frequency 1) ;
+int equal (frequency 1) ;
+int lequal (frequency 1) ;
+int add (frequency 1) ;
+int mult (frequency 1) ;
+int div (frequency 1) ;
+int incr (frequency 1) ;
+int mod (frequency 1) ;
+int abs (frequency 1) ;
+int min (frequency 1) .
+
+
+
+test real operation :
+
+notice heading ("Real Operationen") ;
+
+real assign (frequency 1) ;
+row real (frequency 1) ;
+real equal (frequency 1) ;
+real lequal (frequency 1) ;
+real add (frequency 1) ;
+real mult (frequency 2) ;
+real div (frequency 2) ;
+real incr (frequency 1) ;
+real mod (frequency 2) ;
+real abs (frequency 1) ;
+real min (frequency 1) .
+
+
+
+test text operation :
+
+notice heading ("Text Operationen") ;
+
+text assign 1 (frequency 1) ;
+text assign 10 (frequency 1) ;
+text assign 30 (frequency 1) ;
+row text (frequency 1) ;
+text equal 1 (frequency 1) ;
+text equal 10 (frequency 1) ;
+text equal 30 (frequency 1) ;
+text lequal 1 (frequency 1) ;
+text lequal 10 (frequency 1) ;
+text lequal 30 (frequency 1) ;
+text mult (frequency 1) ;
+cat (frequency 1) ;
+text add 1 (frequency 1) ;
+text add 10 (frequency 2) ;
+text add 30 (frequency 2) ;
+text length 1 (frequency 1) ;
+text length 10 (frequency 1) ;
+text length 30 (frequency 1) ;
+text sub 1 (frequency 1) ;
+text sub 10 (frequency 1) ;
+text sub 30 (frequency 1) ;
+subtext 1 (frequency 1) ;
+subtext 10 (frequency 1) ;
+subtext 30 (frequency 1) ;
+replace 1 (frequency 1) ;
+replace 10 (frequency 1) ;
+replace 30 ( frequency 1) ;
+text 1 (frequency 2) ;
+text 10 (frequency 2) ;
+text 30 (frequency 2) ;
+pos 1 (frequency 1) ;
+pos 10 (frequency 1) ;
+pos 30 (frequency 1) .
+
+
+
+test convert :
+
+notice heading ("Konvertierungs Operationen") ;
+
+real to int (frequency 1) ;
+int to real (frequency 1) ;
+text to int (frequency 2) ;
+int to text (frequency 1) ;
+int to text 2 (frequency 2) ;
+real to text (frequency 2) ;
+real to text 2 (frequency 2) ;
+code int (frequency 1) ;
+code text (frequency 1) ;
+
+
+END PROC test speed ;
+
+END PACKET speed tester
diff --git a/app/speedtest/1986/src/text operation b/app/speedtest/1986/src/text operation new file mode 100644 index 0000000..30ad2ba --- /dev/null +++ b/app/speedtest/1986/src/text operation @@ -0,0 +1,1401 @@ +PACKET text operation DEFINES text assign 1,
+ text assign 10,
+ text assign 30,
+ row text,
+ text mult,
+ cat,
+ text equal 1,
+ text equal 10,
+ text equal 30,
+ text lequal 1,
+ text lequal 10,
+ text lequal 30,
+ text add 1,
+ text add 10,
+ text add 30,
+ text length 1,
+ text length 10,
+ text length 30,
+ text sub 1,
+ text sub 10,
+ text sub 30,
+ subtext 1,
+ subtext 10,
+ subtext 30,
+ replace 1,
+ replace 10,
+ replace 30,
+ text 1,
+ text 10,
+ text 30,
+ pos 1,
+ pos 10,
+ pos 30 :
+
+
+(***************************************************************************)
+(* *)
+(* Autor: A. Steinmann Copyright (C): HRZ - Unibi *)
+(* *)
+(***************************************************************************)
+
+
+ROW 10 TEXT VAR text row ;
+
+INT VAR index,
+ i,
+ j ;
+
+REAL VAR begin,
+ end,
+ act result,
+ text assign factor ;
+
+TEXT VAR single text :: "*",
+ short text :: "ELAN/EUMEL",
+ long text :: "Ein Multi User Betriebssystem!",
+ free text ;
+
+
+
+
+PROC text assign 1 (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := single text
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text assign 1 s (frequency)
+
+END PROC text assign 1 ;
+
+
+
+
+PROC text assign 1 s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := single text
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ text assign factor := act result * msec factor (frequency) - for corr ;
+
+ notice result ("TEXT := (1)", text assign factor)
+
+END PROC text assign 1 s ;
+
+
+
+
+PROC text assign 10 (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := short text
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text assign 10 s (frequency)
+
+END PROC text assign 10 ;
+
+
+
+
+PROC text assign 10 s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := short text
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT := (10)", act result * msec factor (frequency) - for corr)
+
+END PROC text assign 10 s ;
+
+
+
+
+PROC text assign 30 (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := long text
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text assign 30 s (frequency)
+
+END PROC text assign 30 ;
+
+
+
+
+PROC text assign 30 s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := long text
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT := (30)", act result * msec factor (frequency) - for corr)
+
+END PROC text assign 30 s ;
+
+
+
+
+PROC row text (INT CONST frequency) :
+
+ i := 7 ;
+ text row [i] := "" ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ text row [i] := single text
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ row text s (frequency)
+
+END PROC row text ;
+
+
+
+
+PROC row text s (INT CONST frequency) :
+
+ i := 7 ;
+ text row [i] := "" ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ text row [i] := single text
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("ROW TEXT [i]", act result * msec factor (frequency) - for corr)
+
+END PROC row text s ;
+
+
+
+
+PROC text equal 1 (INT CONST frequency) :
+
+ free text := single text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text = single text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text equal 1 s (frequency)
+
+END PROC text equal 1 ;
+
+
+
+
+PROC text equal 1 s (INT CONST frequency) :
+
+ free text := single text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text = single text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT = (1)", act result * msec factor (frequency) - for corr)
+
+END PROC text equal 1 s ;
+
+
+
+
+PROC text equal 10 (INT CONST frequency) :
+
+ free text := short text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text = short text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text equal 10 s (frequency)
+
+END PROC text equal 10 ;
+
+
+
+
+PROC text equal 10 s (INT CONST frequency) :
+
+ free text := short text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text = short text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT = (10)", act result * msec factor (frequency) - for corr)
+
+END PROC text equal 10 s ;
+
+
+
+
+PROC text equal 30 (INT CONST frequency) :
+
+ free text := long text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text = long text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text equal 30 s (frequency)
+
+END PROC text equal 30 ;
+
+
+
+
+PROC text equal 30 s (INT CONST frequency) :
+
+ free text := long text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text = long text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT = (30)", act result * msec factor (frequency) - for corr)
+
+END PROC text equal 30 s ;
+
+
+
+
+PROC text lequal 1 (INT CONST frequency) :
+
+ free text := single text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text <= single text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text lequal 1 s (frequency)
+
+END PROC text lequal 1 ;
+
+
+
+
+PROC text lequal 1 s (INT CONST frequency) :
+
+ free text := single text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text <= single text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT <= (1)", act result * msec factor (frequency) - for corr)
+
+END PROC text lequal 1 s ;
+
+
+
+
+PROC text lequal 10 (INT CONST frequency) :
+
+ free text := short text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text <= short text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text lequal 10 s (frequency)
+
+END PROC text lequal 10 ;
+
+
+
+
+PROC text lequal 10 s (INT CONST frequency) :
+
+ free text := short text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text <= short text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT <= (10)", act result * msec factor (frequency) - for corr)
+
+END PROC text lequal 10 s ;
+
+
+
+
+PROC text lequal 30 (INT CONST frequency) :
+
+ free text := long text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text <= long text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text lequal 30 s (frequency)
+
+END PROC text lequal 30 ;
+
+
+
+
+PROC text lequal 30 s (INT CONST frequency) :
+
+ free text := long text ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ IF free text <= long text
+ THEN
+ FI
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT <= (30)", act result * msec factor (frequency) - for corr)
+
+END PROC text lequal 30 s ;
+
+
+
+
+PROC text mult (INT CONST frequency) :
+
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := i * single text
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text mult s (frequency)
+
+END PROC text mult ;
+
+
+
+
+PROC text mult s (INT CONST frequency) :
+
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := i * single text
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT * (Faktor 1)", act result * msec factor (frequency) - for corr)
+
+END PROC text mult s ;
+
+
+
+
+PROC cat (INT CONST frequency) :
+
+ free text := "" ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text CAT single text ;
+ free text := ""
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ cat s (frequency)
+
+END PROC cat ;
+
+
+
+
+PROC cat s (INT CONST frequency) :
+
+ free text := "" ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text CAT single text ;
+ free text := ""
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("CAT (1)", act result * msec factor (frequency) - for corr)
+
+END PROC cat s ;
+
+
+
+
+PROC text add 1 (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := single text + single text
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text add 1 s (frequency)
+
+END PROC text add 1 ;
+
+
+
+
+PROC text add 1 s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := single text + single text
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT + (1)", act result * msec factor (frequency) - for corr)
+
+END PROC text add 1 s ;
+
+
+
+PROC text add 10 (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := short text + short text
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text add 10 s (frequency)
+
+END PROC text add 10 ;
+
+
+
+
+PROC text add 10 s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := short text + short text
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT + (10)", act result * msec factor (frequency) - for corr)
+
+END PROC text add 10 s ;
+
+
+
+
+PROC text add 30 (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := long text + long text
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text add 30 s (frequency)
+
+END PROC text add 30 ;
+
+
+
+
+PROC text add 30 s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := long text + long text
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("TEXT + (30)", act result * msec factor (frequency) - for corr)
+
+END PROC text add 30 s ;
+
+
+
+
+PROC text length 1 (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ i := length (single text)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text length 1 s (frequency)
+
+END PROC text length 1 ;
+
+
+
+
+PROC text length 1 s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ i := length (single text)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("length (1)", act result * msec factor (frequency) - for corr)
+
+END PROC text length 1 s ;
+
+
+
+
+PROC text length 10 (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ i := length (short text)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text length 10 s (frequency)
+
+END PROC text length 10 ;
+
+
+
+
+PROC text length 10 s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ i := length (short text)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("length (10)", act result * msec factor (frequency) - for corr)
+
+END PROC text length 10 s ;
+
+
+
+
+PROC text length 30 (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ i := length (long text)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text length 30 s (frequency)
+
+END PROC text length 30 ;
+
+
+
+
+PROC text length 30 s (INT CONST frequency) :
+
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ i := length (long text)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("length (30)", act result * msec factor (frequency) - for corr)
+
+END PROC text length 30 s ;
+
+
+
+
+PROC text sub 1 (INT CONST frequency) :
+
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := single text SUB i
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text sub 1 s (frequency)
+
+END PROC text sub 1 ;
+
+
+
+
+PROC text sub 1 s (INT CONST frequency) :
+
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := single text SUB i
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("SUB (1)", act result * msec factor (frequency) - for corr)
+
+END PROC text sub 1 s ;
+
+
+
+
+PROC text sub 10 (INT CONST frequency) :
+
+ i := 7 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := short text SUB i
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text sub 10 s (frequency)
+
+END PROC text sub 10 ;
+
+
+
+
+PROC text sub 10 s (INT CONST frequency) :
+
+ i := 7 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := short text SUB i
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("SUB (10)", act result * msec factor (frequency) - for corr)
+
+END PROC text sub 10 s ;
+
+
+
+
+PROC text sub 30 (INT CONST frequency) :
+
+ i := 17 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := long text SUB i
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text sub 30 s (frequency)
+
+END PROC text sub 30 ;
+
+
+
+
+PROC text sub 30 s (INT CONST frequency) :
+
+ i := 17 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := long text SUB i
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("SUB (30)", act result * msec factor (frequency) - for corr)
+
+END PROC text sub 30 s ;
+
+
+
+
+PROC subtext 1 (INT CONST frequency) :
+
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := subtext (single text , i, i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ subtext 1 s (frequency)
+
+END PROC subtext 1 ;
+
+
+
+
+PROC subtext 1 s (INT CONST frequency) :
+
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := subtext (single text , i, i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("subtext (TEXT, INT, INT) (1)", act result * msec factor (frequency) - for corr)
+
+END PROC subtext 1 s ;
+
+
+
+
+PROC subtext 10 (INT CONST frequency) :
+
+ i := 7 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := subtext (short text , i, i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ subtext 10 s (frequency)
+
+END PROC subtext 10 ;
+
+
+
+
+PROC subtext 10 s (INT CONST frequency) :
+
+ i := 7 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := subtext (short text , i, i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("subtext (TEXT, INT, INT) (10)", act result * msec factor (frequency) - for corr)
+
+END PROC subtext 10 s ;
+
+
+
+
+PROC subtext 30 (INT CONST frequency) :
+
+ i := 17 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := subtext (long text , i, i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ subtext 30 s (frequency)
+
+END PROC subtext 30 ;
+
+
+
+
+PROC subtext 30 s (INT CONST frequency) :
+
+ i := 17 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := subtext (long text , i, i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("subtext (TEXT, INT, INT) (30)", act result * msec factor (frequency) - for corr)
+
+END PROC subtext 30 s ;
+
+
+
+
+PROC replace 1 (INT CONST frequency) :
+
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ replace (single text, i, single text)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ replace 1 s (frequency)
+
+END PROC replace 1 ;
+
+
+
+
+PROC replace 1 s (INT CONST frequency) :
+
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ replace (single text, i, single text)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("replace (TEXT, TEXT, INT) (1)", act result * msec factor (frequency) - for corr)
+
+END PROC replace 1 s ;
+
+
+
+
+PROC replace 10 (INT CONST frequency) :
+
+ i := 7 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ replace (short text, i, single text)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ replace 10 s (frequency)
+
+END PROC replace 10 ;
+
+
+
+
+PROC replace 10 s (INT CONST frequency) :
+
+ i := 7 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ replace (short text, i, single text)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("replace (TEXT, TEXT, INT) (10)", act result * msec factor (frequency) - for corr)
+
+END PROC replace 10 s ;
+
+
+
+
+PROC replace 30 (INT CONST frequency) :
+
+ i := 17 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ replace (long text, i, single text)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ replace 30 s (frequency)
+
+END PROC replace 30 ;
+
+
+
+
+PROC replace 30 s (INT CONST frequency) :
+
+ i := 17 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ replace (long text, i, single text)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("replace (TEXT, TEXT, INT) (30)", act result * msec factor (frequency) - for corr)
+
+END PROC replace 30 s ;
+
+
+
+
+PROC text 1 (INT CONST frequency) :
+
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (single text, i, i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text 1 s (frequency)
+
+END PROC text 1 ;
+
+
+
+
+PROC text 1 s (INT CONST frequency) :
+
+ i := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (single text, i, i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("text (TEXT, INT, INT) (1)", act result * msec factor (frequency) - for corr)
+
+END PROC text 1 s ;
+
+
+
+
+PROC text 10 (INT CONST frequency) :
+
+ i := 7 ;
+ j := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (short text, j, i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text 10 s (frequency)
+
+END PROC text 10 ;
+
+
+
+
+PROC text 10 s (INT CONST frequency) :
+
+ i := 7 ;
+ j := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (short text, j, i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("text (TEXT, INT, INT) (10)", act result * msec factor (frequency) - for corr)
+
+END PROC text 10 s ;
+
+
+
+
+PROC text 30 (INT CONST frequency) :
+
+ i := 17 ;
+ j := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (long text, j, i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ text 30 s (frequency)
+
+END PROC text 30 ;
+
+
+
+
+PROC text 30 s (INT CONST frequency) :
+
+ i := 17 ;
+ j := 1 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ free text := text (long text, j, i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("text (TEXT, INT, INT) (30)", act result * msec factor (frequency) - for corr)
+
+END PROC text 30 s ;
+
+
+
+
+PROC pos 1 (INT CONST frequency) :
+
+ i := 1 ;
+ j := 0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ j := pos (single text, single text, i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ pos 1 s (frequency)
+
+END PROC pos 1 ;
+
+
+
+
+PROC pos 1 s (INT CONST frequency) :
+
+ i := 1 ;
+ j := 0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ j := pos (single text, single text, i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("pos (TEXT, TEXT, INT) (1)", act result * msec factor (frequency) - for corr)
+
+END PROC pos 1 s ;
+
+
+
+
+PROC pos 10 (INT CONST frequency) :
+
+ i := 1 ;
+ j := 0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ j := pos (short text, single text, i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ pos 10 s (frequency)
+
+END PROC pos 10 ;
+
+
+
+
+PROC pos 10 s (INT CONST frequency) :
+
+ i := 1 ;
+ j := 0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ j := pos (short text, single text, i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("pos (TEXT, TEXT, INT) (10)", act result * msec factor (frequency) - for corr)
+
+END PROC pos 10 s ;
+
+
+
+
+PROC pos 30 (INT CONST frequency) :
+
+ i := 1 ;
+ j := 0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ j := pos (long text, single text, i)
+ END REP ;
+ end := clock (0) ;
+
+ act result := end - begin ;
+
+ pos 30 s (frequency)
+
+END PROC pos 30 ;
+
+
+
+
+PROC pos 30 s (INT CONST frequency) :
+
+ i := 1 ;
+ j := 0 ;
+ begin := clock (0) ;
+ FOR index FROM 1 UPTO frequency
+ REP
+ j := pos (long text, single text, i)
+ END REP ;
+ end := clock (0) ;
+
+ IF act result > end - begin
+ THEN act result := end - begin
+ FI ;
+
+ notice result ("pos (TEXT, TEXT, INT) (30)", act result * msec factor (frequency) - for corr)
+
+END PROC pos 30 s ;
+
+
+END PACKET text operation ;
|