benchmarks/animation/benchmark.js
function createBoxes(count) {
    var boxes = [];
    for (var i = 0; i < N; i++) {
      boxes.push(
        V(
          elementFlag,
          "div",
          "box-view",
          V(elementFlag, "div", "box", count % 100, {
            style: {
              top: Math.sin(count / 10) * 10 + "px",
              left: Math.cos(count / 10) * 10 + "px",
              background: "rgb(0, 0," + count % 255 + ")"
            }
          })
        )
      );
    }
    return boxes;
  }
function createBoxes(count) {
    var boxes = [];
    for (var i = 0; i < N; i++) {
      boxes.push(
        V(
          elementFlag,
          "div",
          "box-view",
          V(elementFlag, "div", "box", count % 100, {
            style: {
              top: Math.sin(count / 10) * 10 + "px",
              left: Math.cos(count / 10) * 10 + "px",
              background: "rgb(0, 0," + count % 255 + ")"
            }
          })
        )
      );
    }
    return boxes;
  }
function createBoxes ( count ) { var boxes = [ ] ; for ( var i = 0 ; i < N ; i ++ ) { boxes . push ( V ( elementFlag , "div" , "box-view" , V ( elementFlag , "div" , "box" , count % 100 , { style : { top : Math . sin ( count / 10 ) * 10 + "px" , left : Math . cos ( count / 10 ) * 10 + "px" , background : "rgb(0, 0," + count % 255 + ")" } } ) ) ) ; } return boxes ; }
Implementation should be same as React for comparison
Implementation should be same as React for comparison