mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 22:27:55 -05:00
Adds an OBJECT library with UNITY_BUILD OFF to measure per-file compile cost of PDM field types in isolation. Wired into both Fwk/CMakeLists.txt and the main CMakeLists.txt (under RESINSIGHT_INCLUDE_APPFWK_TESTS). Also adds build-bench to .gitignore.
1.6 KiB
1.6 KiB
cafPdm_CompileBench — Compile Time Benchmark
Configuration
| Setting | Value |
|---|---|
| Branch | pdm-compile-bench |
| Commit | c7ec12fba |
| Compiler | MSVC (cl.exe) |
| Build system | Ninja |
| Parallelism | 20 cores |
| buildcache | disabled |
| Precompiled headers | disabled |
| Unity build | disabled |
| Date | 2026-04-06 |
The benchmark target is an OBJECT library with UNITY_BUILD OFF, so each
translation unit is compiled in isolation. Times are wall-clock milliseconds
read from .ninja_log (finish_time - start_time).
Raw Results (ms)
| File | Run 1 | Run 2 | Run 3 | Avg |
|---|---|---|---|---|
| bench_filepath_fields.cpp | 2352 | 2278 | 2370 | 2333 |
| bench_basic_fields.cpp | 2594 | 2544 | 2603 | 2580 |
| bench_container_fields.cpp | 2749 | 2686 | 2805 | 2747 |
| bench_enum_fields.cpp | 3835 | 3703 | 3785 | 3774 |
| bench_mixed_fields.cpp | 4497 | 4323 | 4554 | 4458 |
Notes
- Each run was a full clean rebuild (
ninja -t clean cafPdm_CompileBenchfollowed by rebuild). - The benchmark files exercise different combinations of PDM field types:
bench_filepath_fields—caf::FilePathfieldsbench_basic_fields— primitive field types (int,double,bool,QString)bench_container_fields—std::vectorcontainer fieldsbench_enum_fields— enum fields withAppEnumbench_mixed_fields— mix of all field types
bench_mixed_fieldsis the heaviest translation unit (~4458 ms avg) and is the most representative proxy for a real PDM object with diverse field usage.