3nids

Untitled

Mar 30th, 2026
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. === Pure QSettings benchmark (100000 iterations) ===
  2.  
  3. --- Construction overhead ---
  4.  
  5. QSettings() IniFormat ctor+dtor = 11754 ns
  6. QSettings(path, Ini) ctor+dtor = 2244 ns
  7.  
  8. --- Single read (reused instance) ---
  9.  
  10. Scenario QSettings QHash
  11. ---------------------------------------------------------------
  12. Read user key 90 ns 11 ns
  13. Read global key 96 ns 14 ns
  14.  
  15. --- Single read (NEW instance each call) ---
  16.  
  17. Scenario QSettings QHash
  18. ---------------------------------------------------------------
  19. Read user key 11663 ns 11 ns
  20.  
  21. --- Thread-local singleton read ---
  22.  
  23. thread_local QSettings* read 90 ns
  24.  
  25. --- Realistic: 100 reads × 1000 rounds ---
  26.  
  27. QSettings (new each) × 1000: 1163.9 ms
  28. QSettings (reused) × 1000: 28.4 ms
  29. thread_local singleton × 1000: 29.9 ms
  30. QHash only × 1000: 17.1 ms
Advertisement
Add Comment
Please, Sign In to add comment