nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: update base_attr_abstract[12].nit
[nit.git]
/
tests
/
bench_send.nit
diff --git
a/tests/bench_send.nit
b/tests/bench_send.nit
index
ee546c9
..
d3c1b7c
100644
(file)
--- a/
tests/bench_send.nit
+++ b/
tests/bench_send.nit
@@
-16,8
+16,8
@@
class A
class A
- readable writable attr _val: Int = 0
- meth hop(a: A, b: A, c: A)
+ var val: Int = 0
+ fun hop(a: A, b: A, c: A)
do
if a.val > val then
a.hop(b, c, self)
do
if a.val > val then
a.hop(b, c, self)
@@
-27,7
+27,7
@@
class A
foo(b, c)
foo(c, b)
end
foo(b, c)
foo(c, b)
end
- meth foo(a: A, b: A)
+ fun foo(a: A, b: A)
do
if a.val > val then
a.foo(b, self)
do
if a.val > val then
a.foo(b, self)
@@
-35,25
+35,28
@@
class A
bar(a)
bar(b)
end
bar(a)
bar(b)
end
- meth bar(a: A)
+ fun bar(a: A)
do
if a.val > val then
a.bar(self)
end
baz
end
do
if a.val > val then
a.bar(self)
end
baz
end
- meth baz
+ fun baz
do
do
+ i += 1
end
end
+ var i = 0
+
init
do
end
end
class B
init
do
end
end
class B
-special A
- redef meth val: Int
+ super A
+ redef fun val: Int
do
return 1
end
do
return 1
end
@@
-64,8
+67,8
@@
special A
end
class C
end
class C
-special A
- redef meth val: Int
+ super A
+ redef fun val: Int
do
return 2
end
do
return 2
end
@@
-76,8
+79,8
@@
special A
end
class D
end
class D
-special A
- redef meth val: Int
+ super A
+ redef fun val: Int
do
return 3
end
do
return 3
end
@@
-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