HNHacker News
TopNewBestAskShowJobs

gpu64

13 karma · joined October 18, 2023

submissionscomments
gpu64··on C++ Modules: Packaging Story
Yeah, how much modules/PCHs would help probably depends a lot on your code base. I read about clangs work on modules and they seemed a bit uncertain if you'd get much benefit at all once you switch on optimizations. https://clang.llvm.org/docs/StandardCPlusPlusModules.html#ho...
gpu64··on C++ Modules: Packaging Story
I used cloc so blank lines and comments should be ignored.
gpu64··on C++ Modules: Packaging Story
It's crazy to see how much work header files make the C++ compiler do just to build hello world:

    $ gcc -E hello.c | cloc --force-lang=c -
    419
    $ g++ -E -std=c++11 hello_iostream.cpp | cloc --force-lang=c++ -
    20707
    $ g++ -E -std=c++20 hello_iostream.cpp | cloc --force-lang=c++ -
    30876
    $ g++ -E -std=c++20 hello_std_format.cpp | cloc --force-lang=c++ -
    42757
Just bumping the C++ std version can add thousands of lines of code.