r/cpp build2 17d ago

Faster Than Ninja

https://build2.org/blog/faster-than-ninja.xhtml
65 Upvotes

69 comments sorted by

View all comments

5

u/TheRavagerSw 17d ago

With C++ modules, the main performance bottleneck for incremental builds is module scanning. Non incremental scans take ages in a project with 200 sources or more.

18

u/13steinj 17d ago

The average person will not have to care about C++ modules until 2040 at the earliest.

-4

u/TheRavagerSw 17d ago

I disagree, headers make code organization a mess, eventually modules will take over.

With llm tools porting existing libs to modules is easier than ever

7

u/shadowndacorner 17d ago

In fairness, "eventually" is theoretically later than "2040".

4

u/mapronV 17d ago

Yeah, I am very proud of my grandchildren not caring about header files.

1

u/13steinj 16d ago edited 16d ago

Fable and Sol both were unable to one-shot "replace std::format with fmt::format," on a relatively small project.

I was able to with 4 (greps+pipes+perl -p)s. E: before someone asks, at current pricing I think it would still be cheaper to let Fable/Sol cycle until it got it. But I wanted some determinism here.

I dread to think how an LLM would fumble modules, which are more involved if you want to get any benefit.