POJO vs Functions no loop
Date tested:
8 years ago
User agent:
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Test name
Executions per second
POJO
23411518.0 Ops/sec
Function
1792374016.0 Ops/sec
Benchmark definition (click to collapse):
Tests:
POJO
var x = { value : 10, label : 'Codice fiscale, valueStyle : { fontsize: 14 }, isEmpty : function() { return 2%2 == 0 }, isVisible : true, style : { xs_width: "100%", sm_width: "50%", xs_marginBottom: 20, sm_paddingRight: 5 }, otherStuff: [ { style: {color: "red", xs_width: "100%", sm_width: "50%", xs_marginBottom: 20, sm_paddingRight: 5} , class: "test_" }, { style: {color: "blue"}, class: "toast_" } ] };
Function
var xxx = { value : 20, label : 'Codice fiscale', valueStyle : { fontsize: 14 }, isEmpty : function() { return 2%2 == 0 }, isVisible : true, style : { xs_width: "100%", sm_width: "50%", xs_marginBottom: 20, sm_paddingRight: 5 }, otherStuff: [ { style: {color: "red", xs_width: "100%", sm_width: "50%", xs_marginBottom: 20, sm_paddingRight: 5} , class: "test_" }, { style: {color: "blue"}, class: "toast_" } ] }; var y = function() { return { value : 10, label : 'Codice fiscale', valueStyle : { fontsize: 14 }, isEmpty : function() { return 2%2 == 0 }, isVisible : true, style : { xs_width: "100%", sm_width: "50%", xs_marginBottom: 20, sm_paddingRight: 5 }, otherStuff: [ { style: {color: "red", xs_width: "100%", sm_width: "50%", xs_marginBottom: 20, sm_paddingRight: 5} , class: "test_" }, { style: {color: "blue"}, class: "toast_" } ] }; }
Open this result on MeasureThat.net