Optimising a small real-world C++ application
summary
Converts fixed-width EBCDIC/packed-BCD COBOL files to pipe-separated CSV using a JSON field spec and iterative changes that double and redouble speed: initial C++ prototype reads 191 MB in ~10 s, replaces heavy std::string work with enums and C-style buffers, eliminates pointless BCD->float->string roundtrips, switches to memory-mapped input via Boost mmap, inspects hotspots with valgrind/cachegrind and perf and finally unrolls loops to reach about 220 MB/s single-threaded.
AI-written summary · about
chapters (12)
- 0:00Introduction to optimization
- 1:20Understanding the problem
- 3:24Performance approach strategy
- 7:36Tools for performance analysis
- 11:04Analyzing input data structure
- 15:36First code version implementation
- 20:19Profiling the initial version
- 24:30Deep dive with cachegrind
- 30:14Optimizing string processing
- 34:07Refining decimal and I/O logic
- 37:27Advanced code refactoring
- 45:19Final optimizations and conclusion
related talks
27mHigh Performance Architecture
01h 05mFast and small C++ - When efficiency matters
58mC++ Performance and Optimisation
01h 03mTurbocharged: Writing High-Performance C# and .NET Code
37mC++ as an Optimizing Assembler - a Performance Talk
42mMeasure Twice, Optimize Once: Real-World .NET Profiling with Visual Studio
33mReaching Ludicrous Speed
01h 00mMoving Faster: Everyday efficiency in modern C++
