Open zhuzhzh opened 2 months ago
Using the latest version of the fmt library instead of bundled fmt library in spdlog may reduce the compile time.
I used the external latest fmt library. but I didn't find any improvement.
the first line in example.cpp:
I commented out the user_defined_example()
which leads to the compilation error.
Then I recompile the example.
g++ -g example.cpp -I/home/public/fmt/include -L/home/public/fmt/lib64 -lfmt -I/home/public/spdlog/include -L/home/public/spdlog/lib64 -lspdlog -DSPDLOG_COMPILED_LIB -I/home/public/spdlog/include -lpthread -o logger
make 3.16s user 0.18s system 97% cpu 3.451 total
Then, compile time may not be reduced any further.
the example.cpp is the built-in example.
I precompile the spdlog intot the shared lib.
Here is the profile.