Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- === Pure QSettings benchmark (100000 iterations) ===
- --- Construction overhead ---
- QSettings() IniFormat ctor+dtor = 11754 ns
- QSettings(path, Ini) ctor+dtor = 2244 ns
- --- Single read (reused instance) ---
- Scenario QSettings QHash
- ---------------------------------------------------------------
- Read user key 90 ns 11 ns
- Read global key 96 ns 14 ns
- --- Single read (NEW instance each call) ---
- Scenario QSettings QHash
- ---------------------------------------------------------------
- Read user key 11663 ns 11 ns
- --- Thread-local singleton read ---
- thread_local QSettings* read 90 ns
- --- Realistic: 100 reads × 1000 rounds ---
- QSettings (new each) × 1000: 1163.9 ms
- QSettings (reused) × 1000: 28.4 ms
- thread_local singleton × 1000: 29.9 ms
- QHash only × 1000: 17.1 ms
Advertisement
Add Comment
Please, Sign In to add comment