|
Boost : |
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2024-08-12 17:38:52
ÑÑ, 10 иÑл. 2024â¯Ð³. в 00:01, Antony Polukhin <antoshkka_at_[hidden]>:
> понеделÑник, 8 иÑÐ»Ñ 2024â¯Ð³. полÑзоваÑÐµÐ»Ñ Ruben Perez <rubenperez038_at_[hidden]> напиÑал:
> <...>
>>
>> I'm happy to hear your opinion.
>
> My opinion is that I have not enough experience with modules yet :)
>
> To fix that I'll try to modularise Boost.PFR in a few months. Many thanks for the links, especially with CMake scripts for modules
Here's my first attempt https://github.com/boostorg/pfr/pull/177/files
I've only tested it on clang-15. Looks like the compiler has issues
with mixing global module fragment and includes (just as was noted
above), so I've ended up with a toy sample that uses only std::puts.
And it works!
The compilation time change is qute impressive:
$ time clang++-15 -std=c++20 -I /data/code/boost/
example/motivating_example0.cpp
real 0m2,051s
user 0m1,844s
sys 0m0,144s
$ time clang++-15 -std=c++20 -fmodule-file=pfr.pcm pfr.pcm
example/module_usage.cpp
real 0m0,375s
user 0m0,249s
sys 0m0,107s
No idea how to deal with dependencies between diffrent Boost
libraries, so I'd probably try to modularise Boost.Core +
Boost.TypeIndex to get the idea.
-- Best regards, Antony Polukhin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk