nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compiler: replace the option `--stacktrace` with a simpler `--no-stacktrace`
[nit.git]
/
tests
/
bench_send.nit
diff --git
a/tests/bench_send.nit
b/tests/bench_send.nit
index
2a7fa1b
..
d3c1b7c
100644
(file)
--- a/
tests/bench_send.nit
+++ b/
tests/bench_send.nit
@@
-16,7
+16,7
@@
class A
class A
- readable writable var _val: Int = 0
+ var val: Int = 0
fun hop(a: A, b: A, c: A)
do
if a.val > val then
fun hop(a: A, b: A, c: A)
do
if a.val > val then
@@
-44,15
+44,18
@@
class A
end
fun baz
do
end
fun baz
do
+ i += 1
end
end
+ var i = 0
+
init
do
end
end
class B
init
do
end
end
class B
-special A
+ super A
redef fun val: Int
do
return 1
redef fun val: Int
do
return 1
@@
-64,7
+67,7
@@
special A
end
class C
end
class C
-special A
+ super A
redef fun val: Int
do
return 2
redef fun val: Int
do
return 2
@@
-76,7
+79,7
@@
special A
end
class D
end
class D
-special A
+ super A
redef fun val: Int
do
return 3
redef fun val: Int
do
return 3
@@
-97,7
+100,16
@@
b.val = 1
c.val = 2
d.val = 3
var i = 0
c.val = 2
d.val = 3
var i = 0
-while i < 100000 do
+
+var n = 10
+if args.not_empty then n = args.first.to_i
+
+while i < 1.lshift(n) do
a.hop(b, c, d)
i = i + 1
end
a.hop(b, c, d)
i = i + 1
end
+
+print a.i
+print b.i
+print c.i
+print d.i