[thelist] Custom objects and performance in JavaScript

Tom Dell'Aringa pixelmech at yahoo.com
Mon Nov 14 07:42:15 CST 2005

Hi there,

I have a question about performance, wondering if anyone has any insight. I have a set of data -
basically name (or key)/value pairs. I could use a an array or a custom object. Currently I am
using a custom object, kind of like a Hash I guess:

var stateData = {
	'colorado_image' : 'image.html',
	'colorado_desc' : 'description.xml',
	'scene2_image' : 'image2.html',
	'scene2_desc' : 'description2.xml', 
	'scene3_image' : 'image3.html',
	'scene3_desc' : 'description3.xml' };

Is there a performance benefit/hit in using the object or is there basically no difference? If the
data begins to grow to say 50-100 objects, what about then? 



"I was in a convenience store reading a magazine and the clerk came up to me and said "This is not a library". so I said, "All right, I will talk louder then!"

More information about the thelist mailing list