pingjiang / octane-benchmark

Automatically exported from code.google.com/p/octane-benchmark
0 stars 0 forks source link

Splay creates lots of objects with unaccessed & fixed value properties #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I found something odd with the Splay benchmark. It create lots and lots of 
objects with properties, `array` and `string`, that are never accessed/modified 
whose `array` value is also fixed. I think it would better reflect real world 
scenarios if the object was created with an `array` property that was not a 
fixed value, in other words be more like `string`, and whose properties were 
modified in some way.

The snippet I'm referring to is:

    return {
      array  : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
      string : 'String for key ' + tag + ' in leaf node'
    };

A basic tweak would be something like:

    return {
      array  : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, depth ],
      string : 'String for key ' + tag + ' in leaf node'
    };

This doesn't cover the modification/access angle but you get the idea.

Original issue reported on code.google.com by John.Dav...@gmail.com on 9 Sep 2014 at 11:39

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
My "basic tweak" example is a bit bogus too as `depth` would always be `0` but 
the gist is to make the property values dynamic.

Original comment by John.Dav...@gmail.com on 12 Sep 2014 at 9:23