-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generate amalgamation file(with code not just idea) #863
Comments
I don't think this technique will be useful for a small template-based library. Have you actually measured a performance impact? |
No, I have not measured. |
Usually this technology is for projects with lots of translation units, to allow whole program optimization, but to header-only library, I don't think it matters. About convenience, I always commit the whole rapidjson into my project, so I don't need it to be a single header. |
Maybe nobody like this way to use |
I'm a fan of single-file amalgamations for libraries like this, although I would probably not use an unofficial one in case the process somehow introduced subtle issues. |
Thank you for this @gggin ! I was looking for an amalgamated version of RapidJSON for easy management, and this code was really useful. Noticed small change was needed to run
There are two conditions that come to mind when an amalgamation can have better (runtime) performance:
Scenario 1 does not quite apply to all header projects, and if LTO is enabled in compiler ( It is probably the LTO bit why sqlite is referring to amalgamation having better performance. The actual benefit for having an amalgamation is more likely the convenience of integration into projects. |
@juj Thank you for your response, If people need this, it maybe a good thing. |
Here is an amalgamated header right off the |
I just want to an amalgamation file(like botan and sqlite or easyloggingpp).
Just an idea but with codes!
I hope that this idea can be merged into repo.
small question:
Two file
How to generate
node merge.js
rapidjson-amalgamation.h
be createdUsage
Source code
rapidjson.zip
The text was updated successfully, but these errors were encountered: