json-c/json-c — pull request #55 by remicollet (2012-12-13 15:18:11+00:00)
Title: Optimize json_parse_int64 when sscanf work as expected

From callgrind analysis, json_parse_int64 is long because of lot of sscanf / snprintf call

Reading the code, it seems lot of stuff are present to mimic the standard and modern sscanf behavior:
Set errno to ERANGE when out of range, and set value to INT64_MIN / INT64_MAX.

This patch detect the correct behavior of sscanf during configure, and so, avoid lot of unuseful code.

From my minimum bench (parsing a 500k string), it reduce time from 0.09s to 0.06s (well the data contains mostly random integers)