There are 3 levels of execution modes; compile time, runtime, and simd. The default and currently supported mode is ' compile_time'. The others are often not faster or as well tested.
compile_time- This option allows constexpr parsing. In the future the other modes maybe faster and better supported. It may use builtins and runtime only methods when appropriate when detection of the current evaluation mode is available (e.gis_constant_evaluated)runtime- This mode includescompile_timemethods along with using methods only available at runtime ( e.gmemchr).simd- This mode includesruntimemethods along with some simd enhanced methods (e.g. in number parsing).
compile_time
The string data passed to from_json is zero terminated. This allows some potential
optimizations around bounds checking. If the type passed to from_json has a specialization
of daw::json::is_zero_terminated_string it will be assumed to be zero terminated. By default, std::basic_string
evaluates to being a zero terminated string.
no- Bounds checking does not take advantage of assuming a terminated stringyes- The string passed tofrom_jsonis zero terminated
noor the value of thedaw::json::is_zero_terminated_stringspecialization for the String input type
Are comments in whitespace allowed(defaults to no) and, if so, what kind
none- Comments are not allowed. This is conformant with JSON and the fastestcpp- Allow C++ style comments, both/* comment */and// comment until newlineare allowed in places where whitespace is allowed/requiredhash- Allow# comment until newlinehash style line comments (e.g# comment)
none
Do a checked parse or not. If the data is known to be trustworthy and generated correctly, one can disable checking of a parse and gain performance(measured 15% in some documents).
yes- All checks are performedno- Disable many parse time checks, assumes perfect input
yes
Assume the document in minified and there is no whitespace. This may offer performance benefits( measured 5% in some minified documents). This option is incompatible with comments.
no- Assumes there is whitespace in document.yes- Does not skip whitespace in documents, assumes a minified document.
no
- 'no' - Extra members in JSON document are not an error by default
yes- By default, Any non-mapped member is an error
- 'no'