More examples:
Goes from 20mb to 40mb then drops down to 25mb:
var set = {};
var testMemoryUsage = function() {
  var length = 1000000;
  while (length--) set[length] = 1;
};

Goes from 20mb to 120mb then drops down to 96mb:
var set = {};
var testMemoryUsage = function() {
  var length = 1000000;
  while (length--) set['s' + length] = 1;
};

Goes from 20mb to 132mb then drops down to 113mb:
var set = {};
var testMemoryUsage = function() {
  var length = 1000000;
  while (length--) set[Math.random()] = 1;
};

Something's not right if it takes 90mb to store 19mb (in the case of
the Math.random example) of data in a hash table.

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to