summaryrefslogtreecommitdiffstats
path: root/tests/assemble1.bench
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-10 11:56:23 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-10 11:56:23 (GMT)
commite8df4c5fe0ca8dfa8df81f1c61eb5e337d8ba62b (patch)
tree556090915c1e4fb7420fa462964788c31d0852d9 /tests/assemble1.bench
parentc2480e69a5cb24601c36b41ef4d47cf59b0159b7 (diff)
downloadtcl-e8df4c5fe0ca8dfa8df81f1c61eb5e337d8ba62b.zip
tcl-e8df4c5fe0ca8dfa8df81f1c61eb5e337d8ba62b.tar.gz
tcl-e8df4c5fe0ca8dfa8df81f1c61eb5e337d8ba62b.tar.bz2
Eliminate exess spacings in many test-cases
Diffstat (limited to 'tests/assemble1.bench')
-rw-r--r--tests/assemble1.bench19
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/assemble1.bench b/tests/assemble1.bench
index 18fd3a9..e294108 100644
--- a/tests/assemble1.bench
+++ b/tests/assemble1.bench
@@ -20,7 +20,7 @@ proc ulam2 {n} {
load n; # max
dup; # max n
jump start; # max n
-
+
label loop; # max n
over 1; # max n max
over 1; # max in max n
@@ -30,29 +30,29 @@ proc ulam2 {n} {
reverse 2; # n max
pop; # n
dup; # n n
-
+
label skip; # max n
dup; # max n n
push 2; # max n n 2
mod; # max n n%2
jumpTrue odd; # max n
-
+
push 2; # max n 2
div; # max n/2 -> max n
jump start; # max n
-
+
label odd; # max n
push 3; # max n 3
mult; # max 3*n
push 1; # max 3*n 1
add; # max 3*n+1
-
+
label start; # max n
dup; # max n n
push 1; # max n n 1
neq; # max n n>1
jumpTrue loop; # max n
-
+
pop; # max
}
}
@@ -60,12 +60,12 @@ set tcl_traceCompile 2; ulam2 1; set tcl_traceCompile 0
proc test1 {n} {
for {set i 1} {$i <= $n} {incr i} {
- ulam1 $i
+ ulam1 $i
}
}
proc test2 {n} {
for {set i 1} {$i <= $n} {incr i} {
- ulam2 $i
+ ulam2 $i
}
}
@@ -75,11 +75,10 @@ for {set j 0} {$j < 10} {incr j} {
test1 30000
set after [clock microseconds]
puts "compiled: [expr {1e-6 * ($after - $before)}]"
-
+
test2 1
set before [clock microseconds]
test2 30000
set after [clock microseconds]
puts "assembled: [expr {1e-6 * ($after - $before)}]"
}
- \ No newline at end of file