Advertisement
Guest User

jsdoc toolkit better class summary; std jsdoc template patch (header.html)

a guest
Dec 20th, 2010
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // * * * * * * * * * * * * * * * * *
  2. // Activation object Arguments scope
  3. // * * * * * * * * * * * * * * * * *
  4.  
  5. (function (a, dt, index, i, c, r, t, res) {
  6. r = [];
  7. c = a.length;
  8.  
  9. dt = new Date();
  10. index = 20000;
  11. while (index--) {
  12.    a.map(function (t) { return t * t}).filter(function (t) { return t > 5});
  13. }
  14. r[0] = (new Date() - dt);
  15.  
  16. dt = new Date();
  17. index = 20000;
  18. while (index--) {
  19.    for (i = 0, res = []; i < c; i++) {
  20.        t = a[i];
  21.        if (t >= 2.236067) {
  22.            continue;
  23.        } else {
  24.            res.push(t * t);
  25.        }
  26.    }
  27. }
  28. r[1] = (new Date() - dt);
  29.  
  30. alert('ao args: ' + r);
  31. }([1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10]));
  32.  
  33. // * * * * * * * * * * * * * * * * *
  34. // Activation object scope
  35. // * * * * * * * * * * * * * * * * *
  36.  
  37. (function () {
  38. var a = [1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10],
  39.     dt,
  40.     index,
  41.     i,
  42.     c,
  43.     r,
  44.     t,
  45.     res
  46.     ;
  47.  
  48. r = [];
  49. c = a.length;
  50.  
  51. dt = new Date();
  52. index = 20000;
  53. while (index--) {
  54.    a.map(function (t) { return t * t}).filter(function (t) { return t > 5});
  55. }
  56. r[0] = (new Date() - dt);
  57.  
  58. dt = new Date();
  59. index = 20000;
  60. while (index--) {
  61.    for (i = 0, res = []; i < c; i++) {
  62.        t = a[i];
  63.        if (t >= 2.236067) {
  64.            continue;
  65.        } else {
  66.            res.push(t * t);
  67.        }
  68.    }
  69. }
  70. r[1] = (new Date() - dt);
  71.  
  72. alert('ao:      ' + r);
  73. }());
  74.  
  75. // * * * * * * * * * * * * * * * * *
  76. // Global scope
  77. // * * * * * * * * * * * * * * * * *
  78.  
  79. var a = [1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10],
  80.     dt,
  81.     index,
  82.     i,
  83.     c,
  84.     r,
  85.     t,
  86.     res
  87.     ;
  88.  
  89. r = [];
  90. c = a.length;
  91.  
  92. dt = new Date();
  93. index = 20000;
  94. while (index--) {
  95.    a.map(function (t) { return t * t}).filter(function (t) { return t > 5});
  96. }
  97. r[0] = (new Date() - dt);
  98.  
  99. dt = new Date();
  100. index = 20000;
  101. while (index--) {
  102.    for (i = 0, res = []; i < c; i++) {
  103.        t = a[i];
  104.        if (t >= 2.236067) {
  105.            continue;
  106.        } else {
  107.            res.push(t * t);
  108.        }
  109.    }
  110. }
  111. r[1] = (new Date() - dt);
  112.  
  113. alert('global:  ' + r);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement