stephenberry / json_performance

Performance profiling of JSON libraries
MIT License
17 stars 11 forks source link

Performance of simdjson on GCC much slower #14

Closed maja275 closed 1 year ago

maja275 commented 1 year ago

Hi,

Maybe I'm doing something wrong, so could be that this is not an issue/more like a question.

I'm trying to run this benchmark with g++ (GCC) 12.1.1. and I get following results (for reading) :

NLOHMANN
nlohmann json byte length: 863
nlohmann json read: 34.2938 s, 2.39991 MB/s

GLAZE
Glaze json byte length: 863
Glaze json read: 1.44985 s, 56.7661 MB/s

SIMDJSON
simdjson (on demand) json byte length: 617
simdjson (on demand) json read: 4.18398 s, 14.0636 MB/s

RAPIDJSON
RapidJSON json byte length: 863
RapidJSON json read: 4.28463 s, 19.2087 MB/s

It seems that simdjson is slower than rapidjson and glaze. Do you have an idea why is this the case? Is it connected to SIMD or? Did you test it on gcc?

Thanks in advance! :)

stephenberry commented 1 year ago

It looks like you're building in Debug mode. Use Release or ReleaseWithDebugInfo.