-New improved BSON writer

-Performance improvement for reference loop checking
This commit is contained in:
JamesNK
2010-03-24 10:43:41 +00:00
parent 064e5cb8ed
commit 6ce972156d
13 changed files with 806 additions and 240 deletions
@@ -31,6 +31,17 @@ namespace Newtonsoft.Json.Utilities
{
internal class MathUtils
{
public static int IntLength(int i)
{
if (i < 0)
throw new ArgumentOutOfRangeException();
if (i == 0)
return 1;
return (int)Math.Floor(Math.Log10(i)) + 1;
}
public static int HexToInt(char h)
{
if ((h >= '0') && (h <= '9'))