Those benchmarks say nothing...the amount or type of data isn't indicated...???
On data like the above JSON may likely be moderately faster...not in parsing as I still say: XML parsing would win...but the DOM likely takes more to initialize than a Javascript object...
Code: Select all
var species = {
bipedal: {
homosapien: {
male: {
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
},
profile: {
name: "Alex",
age: "27",
height: "5.75",
}
},
female: {
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
},
profile: {
name: "Kristina",
age: "27",
height: "5.75",
}
}
}
}
};
Use the above test data to conduct your profile on...still won't be *that* accurate...but atleast I know what your going against...
There are 25 profiles under each gender, 50 in each JSON and XML...