0b803d0a5fSimplify the json/src/benchmarks.cpp to allow more optimal code gen. o For some unknown reason, the complexity of the benchmark platform prevented some C++ compilers from generating optimal code, properly reflective of the real performance in actual deployment. o Added the json_benchmarks_simple target, which performs the same suite of tests as json_benchmarks. o Simplified the benchmark platform, and emit an "Average" TPS (Transactions Per Second) value reflective of aggregate parse/output performance.
Perry Kundert
2017-10-07 15:50:19 -0700
23440eb86eRemove outdated commentary about the value of eof(), retain input type o We assume the same character int_type as the unerlying std::istream o There are no assumptions on the value of eof(), other than that it will not be a valid unsigned char value. o To retain performance, we do not allow swapping out the underlying std::streambuf during our use of the std::istream for parsing.
Perry Kundert
2017-10-06 12:27:53 -0700
45e1e3d48aRevert some unnecessary member initializer changes.
Perry Kundert
2017-10-06 07:53:31 -0700
5e480b56d8Further simplify character type handling
Perry Kundert
2017-10-06 07:37:49 -0700
1b43a45becImplement correct handling of std::streambuf int_type, eof() o Make no assumptions about eof(), other than that it is somewhere outside of the valid range of char_type.
Perry Kundert
2017-10-05 15:37:03 -0700
184dab60e6Accelerate access to underlying std::istream streambuf
Perry Kundert
2017-10-05 14:13:55 -0700
f775922ca8Specify initializers for yytest, token_string using initializer-lists o We can retain -Weffc++ and specify default initializers by using initializer lists. The risks are low (of additional non-conformat compilers), because there is already one other such initialization used in the code-base.
Perry Kundert
2017-10-04 15:01:10 -0700
546e148b24Further performance improvements, and corrections in get_token_string o An (-'ve valued, typically -1) EOF must never be allowed in token_string, as it be converted to 255 -- a legitimate value. o Comparing against a specific eof() (-1, typically) is more costly than detecting +'ve/-'ve. Since EOF is the only non-positive value allowed we can use the simpler test. o Removed unnecessary test for token_string size, as it is already tested in the method, and must never occur in correct code; used an assert instead.
Perry Kundert
2017-10-04 11:31:10 -0700
8665e25942Rename get_string to move_string to imply side-effect
Perry Kundert
2017-10-04 10:47:52 -0700
e0d890cc23Corrected unnnecessary const restriction on returned std::string
Perry Kundert
2017-10-04 10:21:55 -0700
97a388802dImprove performance by constructing yytext as a std::string o Return its contents when necessary. In many cases, this avoids construction of multiple copies of the yytext token. Exceeds performance of current develop branch.
Perry Kundert
2017-10-04 08:40:32 -0700
7c523338c5Remove unnnecessary NUL termination of yytext (as it may contain NULs)
Perry Kundert
2017-10-04 08:33:35 -0700
14ca1f6f09Restore istream performance #764 o Use std::streambuf I/O instead of std::istream; does not maintain (unused) istream flags. o Further simplify get/unget handling. o Restore original handling of NUL in input stream; ignored during token_string escaping.
Perry Kundert
2017-10-03 14:38:38 -0700
12efeadc2eFurther simplify istream handling; use native unget
Perry Kundert
2017-10-03 08:49:39 -0700
f585fe4eecTest to confirm parsing of multiple JSON records in a istream #367
Perry Kundert
2017-10-02 14:17:23 -0700
90adf6ec20Simplify get_token_string, unnecessary buffering, handle Byte Order Mark
Perry Kundert
2017-10-02 08:50:15 -0700