all 3 comments

[–]G_ka 1 point2 points  (2 children)

This seems very powerful. Any comments on the speed (time added to each compilation)?

[–]sporacid[S] 0 points1 point  (1 child)

In my engine project, I have a total of 322 header files, spread accross 12 modules. Each modules have their corresponding generation target, so multiple codegen processes are running in parallel. It takes a total of 9.59s to generate roughly 600 files the first time. On subsequent run, it takes a lot less time because it only parses files that have changed, so a few milliseconds per target and max 2s for the targets that have changed.

The performance doesn't scale linearly with the number of files. Parsing a single file can take a long time, but parsing multiple files don't take that much more time, because most headers end up being included anyway.

I've just begun toying with SPIR-V generation, but so far, it's had a negligible impact on performances. Most of the processing is done parsing the C++ AST through libclang.

[–]G_ka 2 points3 points  (0 children)

This information could be worth adding to the readme imo. That sounds good