Skip to content

Instantly share code, notes, and snippets.

@dviramontes
Last active June 15, 2016 03:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dviramontes/ae37883a456fb386b839 to your computer and use it in GitHub Desktop.
Save dviramontes/ae37883a456fb386b839 to your computer and use it in GitHub Desktop.
Ext.decode vs JSON.parse
// 48 instances of Ext.decode
// 23 instances of Ext.encode
// collection size 7
(function() {
console.time('test')
var x = Ext.decode(temp1.responseText);
console.timeEnd('test')
console.log(x)
})()//test: 0.597ms
// vs
(function() {
console.time('test')
var x = JSON.parse(temp1.responseText);
console.timeEnd('test')
console.log(x)
})() //test: 0.113ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment