Commit Graph

330 Commits

Author SHA1 Message Date
John Keiser 289cc3e7a0 Treat warnings as errors during compilation 2020-04-15 19:59:38 -07:00
John Keiser 7480b87e07
Merge pull request #693 from simdjson/jkeiser/cmake-quickstartcpp
Add C++11 tests to cmake
2020-04-15 19:53:14 -07:00
Daniel Lemire befa6423be
This massively improves the performance of tight loops relying on a type() call. (#721)
* This massively improves the performance of tight loops relying on a type() call.

* Adding a few more benchmarks
2020-04-15 20:45:40 -04:00
John Keiser fd418f568c Fix c++11 warnings on clang
- namespace x::y is C++17
- static_assert requires message in C++11
2020-04-15 17:27:48 -07:00
John Keiser 09cf18a646 Add C++11 tests to cmake
- Add simdjson-flags target so callers don't have flags forced on them
2020-04-15 17:26:25 -07:00
Daniel Lemire 326c175dcb
Massive performance boost for get<double>. (#719)
* Massive performance boost for get<double>.
2020-04-15 20:09:45 -04:00
Daniel Lemire 6d7c77ddc1
Let us try to check with the exceptions disabled. (#707)
* Tweaking code so that we can run all tests with exceptions off.
* Removing SIMDJSON_DISABLE_EXCEPTIONS
2020-04-15 16:45:36 -04:00
Daniel Lemire b523c43927
Can we provide a size() function to arrays and objects? (eager approach) [TO BE MERGED] (#690)
* This is an implementation of "size()" for arrays and objects.
* Adding benchmark
* Adding a size() remark in the documentation.
* Extending size() to result types.
2020-04-15 10:15:48 -04:00
Paul Dreik 75545ff70d
ref qualify parser methods to avoid use of dangling objects (#703)
To avoid using data belonging to a temporary, the parse functions are ref qualified to get a compile error if used on an rvalue. See https://github.com/simdjson/simdjson/issues/696

Compilation tests are also added, to make sure bad usage fails to compile.

Reviewed by jkeiser.
2020-04-15 09:57:52 +02:00
Daniel Lemire 8539896f3d
It is inconvenient to be unable to print a padded_string. (#713)
* It is inconvenient to be unable to print a padded_string.

* Allows us to print the padded_string even when it is embedded in result object when exceptions are enabled.
2020-04-14 19:07:32 -04:00
Daniel Lemire 334a486737
Tweaking the doxygen. (#700)
* Tweaking the doxygen.

* Fixing typo.
2020-04-14 11:31:46 -04:00
Daniel Lemire 4af7d6f108
Disabling threads on apple's hardware when optimizer is turned off (#692)
* Disabling threads on apple's hardware.

* Turns out that you can have your bread, your butter and you cake too!
2020-04-10 18:41:05 -04:00
John Keiser 6835dd73bc Only apply compile flags to simdjson 2020-04-09 08:52:29 -07:00
John Keiser 54b7291c34 Reference simdjson by name, don't specify include files individually 2020-04-08 14:52:55 -07:00
John Keiser 1e30b6e334 Compile under C++ 11 2020-04-08 14:00:13 -07:00
John Keiser 406240bae3 Support C++ 14 2020-04-08 14:00:13 -07:00
Dirk Eddelbuettel 12ed6336b1
remove three trailing semicolons that -pedantic dislikes (#673) 2020-04-02 21:06:25 -04:00
Daniel Lemire 3cb79e6977
Trying again. (#671) 2020-04-02 19:24:43 -04:00
John Keiser 13aee51011 Add element.type() for type switching 2020-04-02 14:07:19 -07:00
Daniel Lemire 3116e29d16
Release candidate (#655)
* Release candidate
2020-03-31 17:47:25 -04:00
John Keiser d93af1161d Remove set_capacity, replace with allocate
Makes allocation point more predictable
2020-03-30 13:49:54 -07:00
John Keiser 434776db1a Deprecate more things 2020-03-30 13:48:43 -07:00
John Keiser 6167e9cefc Update doxygen to not show deprecated/private things 2020-03-30 13:47:27 -07:00
John Keiser dc918d764e
Merge pull request #646 from simdjson/jkeiser/quickstart-example
Compile all .md examples in CI
2020-03-30 13:44:43 -07:00
John Keiser 7656bd50ee Generate API docs at /api/docs 2020-03-29 17:01:12 -07:00
John Keiser 7ed65e42d7 Add actual examples from basics.md to readme_examples 2020-03-29 16:28:29 -07:00
John Keiser ea8a5020e2 Remove array indexer, make object indexer key lookup 2020-03-28 15:56:43 -07:00
John Keiser 622d9c9480 Replace as_X and is_X with get<T> and is<T> 2020-03-28 15:29:53 -07:00
John Keiser 62da98aef6 Rename dom::stream to dom::document_stream 2020-03-28 13:42:24 -07:00
John Keiser 03746b966b Move document/element/etc. under dom 2020-03-28 13:42:21 -07:00
John Keiser 836e1fc330 Use simdjson_result for all _result classes 2020-03-28 12:03:05 -07:00
John Keiser e836c28008 Deprecate parser error code methods
- Also make competitions compile without warnings
2020-03-28 10:13:20 -07:00
John Keiser 748df8d109 Use string_view instead of string/char* where possible 2020-03-27 13:11:41 -07:00
John Keiser 5ad405006c Return document::element from parse, load, parse_many, load_many 2020-03-27 12:24:41 -07:00
John Keiser e3efbcddc1 Cast padded_string to string_view instead of string 2020-03-27 09:13:11 -07:00
John Keiser c14b2fb36c Remove const char* variants for at_key()
- Remove const char * variants for at_key(), string_view covers them
- Add at_key_case_insensitive variants on *_result
- Add at(), at_key(), at_key_case_insensitive() tests
2020-03-27 09:09:08 -07:00
John Keiser f0f111b387 Make ParsedJson::Iterator backcompat test 2020-03-27 09:07:39 -07:00
Daniel Lemire abb0bf9247 Fixed basictests 2020-03-26 19:40:29 -04:00
John Keiser 56841bcede Fix conversion error on Windows 2020-03-26 12:48:07 -07:00
John Keiser 006cc2ed60 Remove simdjson_move_result 2020-03-26 12:48:03 -07:00
John Keiser 2e420169c3 Remove document::parse and document::load 2020-03-26 10:13:09 -07:00
John Keiser 5aec2671ea Remove JsonStream. Use parse_many() instead. 2020-03-26 09:25:07 -07:00
John Keiser 06587824be Deprecate ParsedJson::Iterator 2020-03-25 18:26:51 -07:00
John Keiser a0bce440a6 Remove document_iterator, document::iterator, ParsedJsonIterator
Keep ParsedJson::Iterator only, without template, in same form as
it was in 0.2
2020-03-25 18:26:51 -07:00
Daniel Lemire 8769e42a56
Fixes issue 600 (#614)
* Fixes issue 600
2020-03-25 18:01:23 -04:00
John Keiser 7cde65aa6e This deprecates json_parse() and build_parsed_json(). 2020-03-25 14:19:24 -07:00
John Keiser e1b1500e3b Make _padded available without using namespace simdjson 2020-03-25 09:37:18 -07:00
John Keiser b28cafc1d1 Remove backslash unescaping from JSON pointer impl
Also speed up non-escaped key lookup
2020-03-25 08:56:40 -07:00
John Keiser 0bcda5e384 Support JSON pointer in DOM navigation model 2020-03-23 15:05:20 -07:00
Daniel Lemire 3e39a998ce Merge branch 'master' of github.com:lemire/simdjson
Conflicts:
	include/simdjson/jsonstream.h
2020-03-22 12:40:34 -04:00