r19141: add a reasonable subset of the qooxdoo runtime environment, and example appli...
[jra/samba/.git] / swat / apps / qooxdoo-examples / performance / ArrayCreate_1.html
1 <html>
2 <head>
3   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4   <title>qooxdoo &raquo; Demo</title>
5   <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
6   <!--[if IE]>
7   <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
8   <![endif]-->
9   <script type="text/javascript" src="../../script/qx.js"></script>
10 </head>
11 <body>
12   <script type="text/javascript" src="../../script/layout.js"></script>
13
14   <div id="demoDescription">
15     <p>Tests for empty Array creation performance</p>
16     <ol>
17       <li>Using "[]"</li>
18       <li>Using "new Array"</li>
19       <li>Using "new Array()"</li>
20     </ol>
21   </div>
22
23   <script type="text/javascript">
24   qx.core.Init.getInstance().defineMain(function()
25   {
26     function ArrayCreate1(vLoops)
27     {
28       var foo;
29
30       for (var i=0; i<vLoops; i++) {
31         foo = [];
32       };
33     };
34
35     function ArrayCreate2(vLoops)
36     {
37       var foo;
38
39       for (var i=0; i<vLoops; i++) {
40         foo = new Array;
41       };
42     };
43
44     function ArrayCreate3(vLoops)
45     {
46       var foo;
47
48       for (var i=0; i<vLoops; i++) {
49         foo = new Array();
50       };
51     };
52
53     new qx.dev.TimeTracker(ArrayCreate1, ArrayCreate2, ArrayCreate3);
54   });
55   </script>
56 </body>
57 </html>