r20445: add README file indicating that the swat directory is no longer relevant
[samba.git] / swat.obsolete / apps / qooxdoo-examples / performance / ArrayCreate_2.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 filled Array creation performance</p>
16     <ol>
17       <li>Using "[ values ]"</li>
18       <li>Using "new Array(values)"</li>
19     </ol>
20   </div>
21
22   <script type="text/javascript">
23   qx.core.Init.getInstance().defineMain(function()
24   {
25     function ArrayCreate1(vLoops)
26     {
27       var foo;
28
29       for (var i=0; i<vLoops; i++) {
30         foo = [ 1, 2, 3, 4, 5 ];
31       };
32     };
33
34     function ArrayCreate2(vLoops)
35     {
36       var foo;
37
38       for (var i=0; i<vLoops; i++) {
39         foo = new Array(1, 2, 3, 4, 5);
40       };
41     };
42
43     new qx.dev.TimeTracker(ArrayCreate1, ArrayCreate2);
44   });
45   </script>
46 </body>
47 </html>