Update README.md
This commit is contained in:
parent
02f9b83353
commit
221c55b620
28
README.md
28
README.md
|
@ -71,34 +71,6 @@ int main(void) {
|
||||||
100 results.
|
100 results.
|
||||||
```
|
```
|
||||||
|
|
||||||
### On Demand
|
|
||||||
|
|
||||||
The new On Demand JSON parser is just as easy, but much faster due to just-in-time parsing. It is in
|
|
||||||
alpha right now. More information can be found in the [On Demand Guide](doc/ondemand.md).
|
|
||||||
|
|
||||||
1. Do step 1 of the [Quick Start](#quick-start).
|
|
||||||
2. Create `quickstart.cpp`:
|
|
||||||
|
|
||||||
```c++
|
|
||||||
#include "simdjson.h"
|
|
||||||
using namespace simdjson;
|
|
||||||
int main(void) {
|
|
||||||
ondemand::parser parser;
|
|
||||||
padded_string json = padded_string::load("twitter.json");
|
|
||||||
ondemand::document tweets = parser.iterate(json);
|
|
||||||
std::cout << uint64_t(tweets["search_metadata"]["count"]) << " results." << std::endl;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
3. `c++ -march=native -o quickstart quickstart.cpp simdjson.cpp`
|
|
||||||
4. `./quickstart`
|
|
||||||
```
|
|
||||||
100 results.
|
|
||||||
```
|
|
||||||
|
|
||||||
You'll notice that the code here is very similar to the [main Quick Start code](#quick-start) (and
|
|
||||||
indeed, it does the same thing). However, if you compare the performance, you should find On
|
|
||||||
Demand much faster.
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue