You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚡️ Speed up method CodeFlashBenchmarkPlugin.write_benchmark_timings by 167% in PR #59 (codeflash-trace-decorator)
Here is the optimized version of the given Python program.
Changes made.
1. Added PRAGMA statements (`PRAGMA synchronous = OFF` and `PRAGMA journal_mode = MEMORY`) after establishing the database connection. These settings help in improving the write performance by reducing the disk I/O operations.
However, note that setting `PRAGMA synchronous = OFF` and `PRAGMA journal_mode = MEMORY` makes the database more vulnerable to corruption in the event of an application crash or power failure. Use these optimizations only when performance is critical, and the database is not mission-critical.
0 commit comments