lens

Benchmark created on


Preparation HTML

<script src="//rawgit.com/joelburget/hubble/raw/lens.js"></script>
<script src="//cdn.rawgit.com/lodash/lodash/b7d5ddab6bf9bbc5b7ffe1b45656145c12f6a1ab/dist/lodash.js"></script>

Setup

var testItem = {
        options: {
            startX: "-5",
            startY: "5",
            endX: "5",
            endY: "5",
            color: "black",
            strokeDasharray: "",
            arrows: "",
            strokeWidth: 2,
            info: {
                box: [400, 400],
                labels: ["x", "y"],
                range: [[-10, 10], [-10, 10]],
                tickStep: [1, 1],
                gridStep: [1, 1],
                markings: "graph"
            }
        },
        
    };
        
    var testData = _.times(7, function() { return testItem; });
    var newProps = {
        "learning": "enhanced",
        "engagement": "so engaged"
    };

Test runner

Ready to run.

Testing in
TestOps/sec
lens
lens(testData).set([1, "options", "info", "box", 0], 800);
ready
lodash
var newData = _.cloneDeep(testData);
newData[1].options.info.box[0] = 800;
ready
json
var newData = JSON.parse(JSON.stringify(testData));
newData[1].options.info.box[0] = 800;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.