Merge branch 'master' of https://github.com/lemire/simdjson
This commit is contained in:
commit
5cd7813f6d
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
I looks like RapidJSON can process inputs at 4 cycles per byte. Rapidjson has a function that skips spaces and comments... it is obviously optimized with some SSE...
|
||||
I looks like RapidJSON can process inputs at 4 cycles per byte. Rapidjson has a function that skips spaces and comments... it is obviously optimized with some SSE... (update: it seems that SSE is not activated by default and using it makes things slower in my tests)
|
||||
|
||||
Everything else just a series of recursive calls with switch cases. It starts like this...
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include "avxprocessing.h"
|
||||
#include "benchmark.h"
|
||||
#include "jsonstruct.h"
|
||||
// #define RAPIDJSON_SSE2 // bad
|
||||
// #define RAPIDJSON_SSE42 // bad
|
||||
#include "rapidjson/document.h"
|
||||
#include "rapidjson/reader.h" // you have to check in the submodule
|
||||
#include "rapidjson/stringbuffer.h"
|
||||
|
@ -77,7 +79,7 @@ int main(int argc, char *argv[]) {
|
|||
true);
|
||||
|
||||
rapidjson::Document d;
|
||||
char buffer[p.second + 1024];
|
||||
char * buffer = (char *) malloc(p.second);
|
||||
memcpy(buffer, p.first, p.second);
|
||||
buffer[p.second] = '\0';
|
||||
BEST_TIME(d.Parse((const char *)buffer).HasParseError(), false,
|
||||
|
@ -88,4 +90,5 @@ int main(int argc, char *argv[]) {
|
|||
std::cout << "input length is "<< p.second << " stringified length is " << strlength << std::endl;
|
||||
BEST_TIME_NOCHECK(rapidstringme((char*) p.first), , repeat, volume,
|
||||
true);
|
||||
free(buffer);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue