Is there a way to add nlohmann json as a a single pair of hpp/cpp? #4818
Unanswered
DamirTenishev
asked this question in
Q&A
Replies: 1 comment 2 replies
-
It's most likely slow in debug builds because the debug standard library adds extra error checking, and the optimization level is reduced, so the compiler does a lot less inlining. You should look at making sure that you have optimizations enabled for your source files that include the library. This may require restructuring your code a bit to keep the JSON-accessing code isolated from the rest of your code so that you can compile it with different optimization flags. You'll still take any hit from using the checking version of your standard library. This can be especially significant if using Visual C++. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The single include option is very handy, but when it comes to debug application which loads large json files, it becomes too slow.
I want to have an option like a single pair hpp/cpp so that I could compile cpp details in release mode even in debug project in order to make it fast.
For sure I can take all the sources and build a library or add all of them to my project, but this would be a long way. Am I missing a simple way to download such a pair?
Beta Was this translation helpful? Give feedback.
All reactions