return steps
end
-var n = 10
+var n = 456
if not args.is_empty then
n = args.first.to_i
end
# Performance test for Array::add_all
-import standard::collection
+var n = 10
+if args.not_empty then n = args.first.to_i
+
+var nn = 1.lshift(n)
var a = new Array[Numeric]
var b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
-for i in 10000.times do
+for i in nn.times do
a.add_all b
end
var c = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
-for i in 10000.times do
+for i in nn.times do
a.add_all c
end
redef fun val1: Int do return _a
init(i: Int) do _a = i
+ redef fun to_s do return "Aa{a}"
end
class Elt2
class B
super Elt2
init(i: Int) do initelt2(i)
+ redef fun to_s do return "Bb{b}"
end
class C
_c = i
_d = j
end
+ redef fun to_s do return "Cc{c}d{d}"
end
class D
init(i)
initelt2(j)
end
+ redef fun to_s do return "Da{a}b{b}"
end
class E
redef fun val1: Int do return 5 end
init(i: Int) do initelt2(i)
+ redef fun to_s do return "Eb{b}"
end
class EltComparator
end
end
-var n = 100
+srand_from(0)
+var n = 20
if not args.is_empty then
n = args.first.to_i
array.push(generator)
end
+print array.join(", ")
+
var comparator = new EltComparator
for i in [0..n[ do
comparator.sort(array)
comparator.toggle
end
+print array.join(", ")
end
end
-var n = 10
+var n = 20
if not args.is_empty then
n = args.first.to_i
end
# See the License for the specific language governing permissions and
# limitations under the License.
-var nb = 5
+var nb = 25
if not args.is_empty then nb = args.first.to_i
var cpt = 0
b1.start
b2.start
-var nb = 100000
+var nb = 10
if not args.is_empty then
nb = args.first.to_i
end
-s.run_for(nb)
+s.run_for(1.lshift(nb))
print(c1.count)
fun test(n: Int)
do
- var m = 10000.lshift(n)
+ var m = 1000.lshift(n)
print("Primes up to {m} {nsieve(m)}")
end
-var n = 2
+var n = 3
if args.length == 1 then
n = args.first.to_i
end
end
fun baz
do
+ i += 1
end
+ var i = 0
+
init
do
end
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
+
+print a.i
+print b.i
+print c.i
+print d.i
fun foo do end
end
class A
- redef fun foo do end
+ redef fun foo do i += 1 end
init do end
+ var i = 0
end
class B
super A
end
+var n = 10
+if args.not_empty then n = args.first.to_i
+
var nb = 60
var a = new Array[Object].with_capacity(nb)
for i in [0..(nb/6)[ do
a[i*6+4] = new E
a[i*6+5] = new F
end
-for i in [0..1000000[ do
+for i in [0..1.lshift(n)[ do
for j in [0..nb[ do
a[j].foo
end
end
+for j in [0..nb[ do
+ print a[j].as(A).i
+end
args.remove("-q")
end
-var n = 5
+var n = 15
if args.length > 0 then n = args.first.to_i
var res = strfib(n)
#alt1 import standard
#alt1 import standard::ropes
-var n = 7
+var n = 4
if not args.is_empty then
n = args.first.to_i
end
# See the License for the specific language governing permissions and
# limitations under the License.
+var n = 10
+if args.not_empty then n = args.first.to_i
+
var s = "*"
-var i = 0
-while i < 8 do
+var i = 1
+while i < n do
s = "Je dis «{s}» et redis «{s}» et trois fois de plus : «{s}{s}{s}».\n"
i = i + 1
end
# See the License for the specific language governing permissions and
# limitations under the License.
+var n = 10
+if args.not_empty then n = args.first.to_i
+
var s = "*"
var i = 0
-while i < 8 do
+while i < n do
s = ["Je dis «", s, "» et redis «", s, "» et trois fois de plus : «", s, s, s, "».\n"].to_s
i = i + 1
end
end
end
-print(tak(37,12,6))
+var n = 17
+if args.not_empty then n = args.first.to_i
+
+print(tak(n,12,6))
-test_mem
shoot_logic
-bench_
nit_args1
nit_args3
nit_args4
nitpretty_args
hamming_number
hailstone
-test_map
-nitls
-nituml
+nitls_args
+nituml_args
-test_mem
shoot_logic
-bench_
nit_args1
nit_args3
nit_args4
nitpretty_args
hamming_number
hailstone
-test_map
-nitls
-nituml
+nitls_args
+nituml_args
--- /dev/null
+Eb3, Da7b9, Aa3, Da2b5, Cc6d3, Cc9d9, Da7b1, Da0b2, Aa8, Aa4, Aa1, Eb2, Cc8d6, Bb6, Cc4d9, Bb7, Cc7d4, Eb2, Bb8, Eb0
+Da0b2, Aa1, Da2b5, Bb6, Aa3, Bb7, Bb8, Aa4, Cc4d9, Eb3, Eb2, Eb2, Eb0, Cc6d3, Cc7d4, Da7b1, Da7b9, Cc8d6, Aa8, Cc9d9
-Primes up to 40000 4203
-Primes up to 20000 2262
-Primes up to 10000 1229
+Primes up to 8000 1007
+Primes up to 4000 550
+Primes up to 2000 303
--- /dev/null
+8192
+14336
+22528
+33792
--- /dev/null
+1024
+0
+1024
+0
+0
+0
+1024
+0
+1024
+0
+0
+0
+1024
+0
+1024
+0
+0
+0
+1024
+0
+1024
+0
+0
+0
+1024
+0
+1024
+0
+0
+0
+1024
+0
+1024
+0
+0
+0
+1024
+0
+1024
+0
+0
+0
+1024
+0
+1024
+0
+0
+0
+1024
+0
+1024
+0
+0
+0
+1024
+0
+1024
+0
+0
+0
-((()(()))((())(()(()))))
+(((((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))))(((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))))))((((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))))(((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))))(((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))))))))(((((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))))(((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))))(((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))))))((((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))))(((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))))))((((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))))(((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))))(((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(())))))))((((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))((((())(()(())))((()(()))((())(()(())))))(((()(()))((())(()(()))))(((())(()(())))((()(()))((())(()(()))))))))))))))
-1092
-1365
-147447
+17
+21
+2295
-1092
-1365
-147447
+17
+21
+2295
2
0
* test 2 *
-1000
-334
+100
+34
* test 3 *
* start:
true
2
0
* test 2 *
-1000
-334
+100
+34
* test 3 *
* start:
true
-1234567891011121314151617181920212223
+12345678910
fun test2(h: Map[Int, Int])
do
print("* test 2 *")
- var nb = 999
+ var nb = 99
var i = 0
while i <= nb do
return a
end
-print(foo(23))
+var n = 10
+if args.not_empty then n = args.first.to_i
+
+print(foo(n))