stephenberry / json_performance

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

Add Boost.JSON (direct) #17

Closed pdimov closed 9 months ago

pdimov commented 9 months ago

Since Boost 1.84, Boost.JSON can parse directly into user types, which improves its read performance on this benchmark considerably.

pdimov commented 9 months ago

Incidentally, while testing this, I noticed that Glaze no longer compiles under Clang 16 for Windows, with errors like

C:/boost-git/json_performance/__build_clang_cl__/_deps/glaze-src/include\glaze/core/common.hpp(718,28): error : constexpr variable 'front_desc' must be initialized by a constant expression [C:\boost-git\json_performance\__build_clang_cl__\json_performance.vcxproj]
C:/boost-git/json_performance/__build_clang_cl__/_deps/glaze-src/include\glaze/core/common.hpp(720,27): error : constexpr if condition is not a constant expression [C:\boost-git\json_performance\__build_clang_cl__\json_performance.vcxproj]
C:/boost-git/json_performance/__build_clang_cl__/_deps/glaze-src/include\glaze/core/common.hpp(674,43): error : call to consteval function 'glz::get_name<&obj_t::fixed_object>' is not a constant expression [C:\boost-git\json_performance\__build_clang_cl__\json_performance.vcxproj]
stephenberry commented 9 months ago

@pdimov, thanks for pointing this out. MSVC has terrible issues with if constexpr support, often evaluating branches that are impossible to reach and violate the standard. My guess is clang_cl has these as well opposed to the normal clang.