Spdk/lib
Daniel Verkamp 38c09e5eed json/parse: rewrite and simplify number parsing
Convert the number parsing function into a linear sequence with a goto
label for each state, rather than a single loop with a state variable.

This makes the code easier to read and also improves speed (better
branch prediction and smaller inner loops for the common case).

On my test system, jsoncat citylots.json > /dev/null improves from
~1.7s to ~1.2s.

This changes behavior of some number parsing test cases: inputs matching
the number grammar as defined by JSON will be returned even if there is
trailing garbage, consistent with the rest of the parser.  For example,
the input 01 will be parsed as a valid number 0 followed by trailing 1.
This only makes any difference when the full input is a single
number value, since if the value was nested in an object or array, the
trailing garbage will not match the expected syntax and the whole parse
will fail with SPDK_JSON_PARSE_INVALID (e.g. [00 will parse the first 0
as a number and then fail on the second 0, since only a comma or right
square bracket would be accepted).

Change-Id: Ifabfaed611219b3e0a06c8677190a28b87e8a13b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-13 13:18:50 -07:00
..
bdev bdev: defer completions from within submit_request 2017-01-13 12:37:54 -07:00
conf conf: move structures out of public API header 2016-11-16 10:33:16 -07:00
copy event: remove 'complete' parameter from poller_register 2017-01-05 11:57:18 -07:00
cunit eofnl: check for extra trailing newlines 2016-10-11 13:30:33 -07:00
env_dpdk ioat: add missing Haswell channel 1 device ID 2017-01-13 10:33:49 -07:00
event event/reactor: update last_action for timer pollers 2017-01-12 14:04:01 -07:00
ioat env: split PCI drivers into individual files 2016-12-06 09:30:55 -07:00
iscsi iscsi: increment the correct lcore's g_num_connections in FFP transition 2017-01-12 10:15:05 -07:00
json json/parse: rewrite and simplify number parsing 2017-01-13 13:18:50 -07:00
jsonrpc jsonrpc_server: allow user to specify socket type 2016-12-15 08:06:33 -07:00
log log: print trace flag names in SPDK_TRACELOG() 2016-11-28 13:15:08 -07:00
net event.h: split non-public API into spdk_internal 2017-01-05 11:57:18 -07:00
nvme nvme/rdma: Support directly connect via trid 2017-01-13 10:57:03 -07:00
nvmf bdev: add API to claim block devices 2017-01-11 16:49:39 -07:00
rpc event: remove spdk_event_allocate() next parameter 2017-01-05 11:57:18 -07:00
scsi bdev: add API to claim block devices 2017-01-11 16:49:39 -07:00
trace Replace rte_get_tsc calls with spdk_get_ticks 2016-10-11 13:34:09 -07:00
util util: add vsprintf version of spdk_sprintf_alloc 2016-11-22 11:52:00 -07:00
Makefile env: rename default implementation to env_dpdk 2016-11-14 08:48:20 -07:00