BOO-999
[boo.git] / performance / ArrayInitializer.boo
blob697e2723a8be163287583c769024e94446709bee
1 import System
2 import System.Diagnostics
4 class Person:
5 [property(Name)]
6 _name as string
8 def use(p as (Person)):
9 Debug.Assert(5 == len(p))
11 def run():
12 for i in range(100000):
13 a = (
14 Person(Name: "a name"),
15 Person(Name: "a name"),
16 Person(Name: "a name"),
17 Person(Name: "a name"),
18 Person(Name: "a name"))
19 use(a)
22 start = date.Now
24 for i in range(10):
25 run()
27 print("elapsed: ${date.Now-start}")