-JProperty performance

-Improved property name escape skipping
This commit is contained in:
James Newton-King
2014-08-03 00:08:31 +12:00
parent 750771e890
commit 8e727a27b2
8 changed files with 281 additions and 29 deletions
@@ -1039,6 +1039,25 @@ If attributes are not mentioned, default values are used in each case.
}, "JObject.ToString");
}
[Test]
public void JObjectCreationAndPropertyAccess()
{
TimeOperation<object>(() =>
{
for (int i = 0; i < Iterations * 100; i++)
{
JObject test = new JObject(
new JProperty("one", 1),
new JProperty("two", 2));
test["i"] = i;
int j = (int)test["i"];
test["j"] = j;
}
return null;
}, "JObjectCreationAndPropertyAccess");
}
[Test]
public void NestedJToken()
{