From 3d1c5e19f45cf484774926ba6e2555d1c8e4c39b Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Sun, 29 May 2011 18:03:22 +0930 Subject: Add support for runtime number precision config Add cjson.encode_number_precision(). Reducing the number precision from 14 to 3 can increase performance up to 50% with number heavy conversions. --- README | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'README') diff --git a/README b/README index 3fa7595..b4f5bcd 100644 --- a/README +++ b/README @@ -204,6 +204,19 @@ the application. Eg: a = {}; b = { a }; a[1] = b +Number precision +---------------- + + precision = cjson.encode_number_precision([precision]) + -- "precision" must be between 1 and 14 (inclusive) + +By default CJSON will use up to 14 digits for precision when +converting a number to text. + +Reducing number precision to 3 can improve performance of number +heavy conversions by up to 50%. + + Persistent encoding buffer ------------------------- -- cgit v1.2.3-55-g6feb