Commit Graph

1114 Commits

Author SHA1 Message Date
Daniel Lemire d9a9fd387d Adding a stress test. 2020-03-13 18:59:15 -07:00
John Keiser 0c190b165c Benchmark minify 2020-03-13 18:59:15 -07:00
John Keiser acc7bd79b0 Support cout << json, cout << minify(json) 2020-03-13 18:59:15 -07:00
John Keiser e4e89fe27a
Fix parse benchmarker (#554)
* Fix parse benchmarker

* Make CI fail when parse doesn't work
2020-03-13 16:19:21 -04:00
Daniel Lemire 24551db0c8 Fixing typo 2020-03-13 14:51:34 -04:00
Daniel Lemire 12e6611ba4 Fix for printf. 2020-03-13 14:44:21 -04:00
Daniel Lemire fb15886a1c Simple fix for name erasure. 2020-03-13 14:41:19 -04:00
Daniel Lemire 06c1dc3a29
Adding NDEBUG to release (#557)
* Adding NDEBUG to release

* Asserts are deleted with NDEBUG. We want hard asserts.
2020-03-13 14:37:02 -04:00
Daniel Lemire 89d9de2353
Adding a check to see whether document::stream copy constructor and assignment actually compile (#556)
* Currently, document::stream contains an attribute that is a reference:

```
      document::parser &parser;
```

Yet we try to have it default on the move operator:

```
  stream &operator=(document::stream &&other) = default;
  stream &operator=(const document::stream &) = delete; // Disallow copying
```

```
  stream(document::stream &&other) = default;
  stream(const document::stream &) = delete; // Disallow copying
```

I am not sure what the move is supposed to do with the reference.

I cannot find where we test the copy constructor and assignment. This has been concerned that it is either dead code or buggy code.

* Remove non-working, unnecessary move constructors

* We still want to disallow copies.

Co-authored-by: John Keiser <john@johnkeiser.com>
2020-03-13 12:53:42 -04:00
Daniel Lemire 12c85d3e23
If we are going to have a google benchmark flag, we better make sure … (#551)
* If we are going to have a google benchmark flag, we better make sure that we test it out minimal (it should build).

* Fix bench_dom_api

Co-authored-by: John Keiser <john@johnkeiser.com>
2020-03-12 17:48:30 -04:00
John Keiser a5afec1f94 Make #defines into simdjson::constants 2020-03-11 19:16:29 -07:00
John Keiser ac0899c043 Add error tests, doc_ref_result[] chaining 2020-03-11 17:19:41 -07:00
John Keiser 40c6213d7e Add parser.load() and load_many() to load files 2020-03-11 17:19:41 -07:00
John Keiser d140bc23f5 Automatically allocate memory as needed in parse 2020-03-11 16:14:54 -07:00
John Keiser 00f0859e1f Add ability to run multiple files 2020-03-11 16:05:05 -07:00
Daniel Lemire a0b2fab6fa
Documenting the fact that we are doing ok with tiny documents. (#549) 2020-03-11 16:21:35 -04:00
Daniel Lemire f669aafcf2 Correcting typo 2020-03-09 17:55:26 -04:00
John Keiser 66a2807210 Rename invalid_json to simdjson_error 2020-03-06 16:12:51 -08:00
John Keiser c3009eb324 Run make amalgamate in Drone CI for x64-amalgamated-build 2020-03-06 15:41:51 -08:00
John Keiser 3bdfe167de Support cout << error 2020-03-06 15:41:51 -08:00
John Keiser 31e8a12e88 Make error_message(error_code) return C string
- Also move all error message logic to include inline
2020-03-06 15:41:51 -08:00
John Keiser ebbfdcd35a Amalgamate before running amalgamated tests 2020-03-05 12:04:45 -08:00
John Keiser 9a7c8fb5be Use parse_many in examples/tests/docs 2020-03-05 12:04:45 -08:00
John Keiser cfef4ff2ad Create parser.parse_many() API 2020-03-05 12:04:45 -08:00
John Keiser b2220d6157 Fix amalgamation 2020-03-05 11:13:25 -08:00
John Keiser 5ff941ae3d Include <simdjson> directly, move document_parser_callbacks to top level 2020-03-04 14:26:54 -08:00
John Keiser 1c922d3b73 Fix JsonStream reference to parser on_error 2020-03-04 14:26:54 -08:00
John Keiser b23dd28a06 Declare functions inline to surface "undefined" errors earlier 2020-03-04 14:26:54 -08:00
John Keiser a55f41a24a Move JsonStream inline implementation to inline .h 2020-03-04 14:26:54 -08:00
John Keiser 5525c6f729 Stop using jsoncharutils.h in JsonStream 2020-03-04 14:26:54 -08:00
John Keiser eb147d9868 Mark jsonformatutils.h/isadetection.h internal
- Move jsonformatutils.h to internal/jsonformatutils.h (it is used by
document::print_json)
- Move isadetection.h to src/ (it is only used internally)
2020-03-04 14:26:54 -08:00
John Keiser f58a5d534e Move parser inline implementation to .cpp 2020-03-04 14:26:54 -08:00
John Keiser b3ea8c406e Add simdjson.cpp for unified use (#515) 2020-03-04 10:12:27 -08:00
John Keiser 99667f7c55 Create top level simdjson.h (#515)
- Allows everyone to #include the same way, singleheader or not.
2020-03-04 10:12:27 -08:00
John Keiser 0b21203141 Document navigation API 2020-03-02 14:49:03 -08:00
Daniel Lemire 9a9ca974c2
Adding Clang Build Analyzer under "real-world usage" 2020-03-02 17:03:11 -05:00
Daniel Lemire 140e4dde3d
Update README.md 2020-02-27 18:00:43 -05:00
Daniel Lemire 68670301e3
Adding instructions regarding how to check for an unsupported CPU (#508)
* Adding instructions.

* Slighty more documentation.
2020-02-25 11:09:51 -05:00
Daniel Lemire a98d841983
Minor tweaks. (#507) 2020-02-24 17:13:10 -05:00
Daniel Lemire 332b764cc4
Minor nitpick (don't start sentence i 2020-02-24 16:44:03 -05:00
John Keiser 560f0742cc Update amalgamated headers 2020-02-22 10:42:13 -08:00
John Keiser 910f272467
Add parser implementation interface and selection API (#501)
* Make architecture implementations virtual functions

- Easier to add new architectures (add implementation to implementation.cpp)
- Easier to add new algorithms / functions to architecture selection
(add to implementation.h, implement)
- Automatically select best implementation in static initialization
- Allow user to explicitly select implementation with a string (i.e.
parameter)
- Allow user to inspect current implementation name/description
- Allow user to list available implementations
- Eliminate architecture enum and architecture-based templating
- Add noexcept in non-inline functions

* Move implementation static methods to their own classes

* Detect best supported implementation on first use

* available_implementationsI() -> available_implementations
2020-02-21 16:34:27 -05:00
John Keiser b6423a3426
Remove googletest entirely as benchmark dependency (#504) 2020-02-21 12:52:38 -05:00
Tim Gates 4d2736ffa9 Fix simple typo: submiting -> submitting
Closes #498
2020-02-18 13:46:06 -08:00
John Keiser 4dc2adf7f8 Update README, add README examples 2020-02-18 08:37:07 -08:00
John Keiser da34f9a253 Add Google Benchmark for calling conventions
- disable it on ubuntu 18.04 tests, which fail for [really can't figure
out why]
2020-02-18 08:37:07 -08:00
John Keiser 1f76737510 Make valstat-ish parse APIs 2020-02-18 08:37:07 -08:00
John Keiser bc8bc7d1a8
Lowercase Architecture and ErrorValues (#487)
ErrorValues -> error_code, Architecture -> architecture
2020-02-14 15:21:28 -08:00
Daniel Lemire 083569fca8
This code is terrible and should not be there. (#496) 2020-02-13 07:38:11 -05:00
Frank Wessels a8903d9765
Update reference for simdjson-go to minio (#492) 2020-02-11 12:58:04 -05:00