Category Archives: Visual Studio

Delete an inline function, save 794 kB

In the previous episode of “Simple Changes to Shrink Chrome” I discussed how deleting ‘const’ from a few key locations could lead to dramatic size savings, due to a VC++ compiler quirk. In this episode I’ll show how deleting an … Continue reading

Posted in Performance, Programming, Visual Studio | Tagged , , | 13 Comments

Add a const here, delete a const there…

I just completed a series of changes that shrunk the Chrome browser’s on-disk size on Windows by over a megabyte, moved about 500 KB of data from its read/write data segments to its read-only data segments, and reduced its private … Continue reading

Posted in Performance, Programming, Visual Studio | Tagged , , | 29 Comments

VC++ /arch:AVX option – unsafe at any speed

Microsoft’s VC++ compiler has an option to generate instructions for new instruction sets such as AVX and AVX2, which can lead to more efficient code when running on compatible CPUs. So, an obvious tactic is to compile critical math-heavy functions … Continue reading

Posted in Programming, Visual Studio | Tagged , , , , | 32 Comments

Zeroing Memory is Hard (VC++ 2015 arrays)

Quick, what’s the difference between these two C/C++ definitions of initialized local variables? char buffer[32] = { 0 };char buffer[32] = {}; One difference is that the first is legal in C and C++, whereas the second is only legal … Continue reading

Posted in Performance, Programming, Visual Studio | Tagged , , | 22 Comments

Compiler Bugs Found When Porting Chromium to VC++ 2015

Moving a big software project to a new compiler can be a lot of work, and few projects are bigger than Chromium. In addition to the main Chromium repository, which includes all of Blink, there are over a hundred other … Continue reading

Posted in Programming, Visual Studio | Tagged , , , | 34 Comments

Thread Naming in Windows: Time for Something Better

Windows lets you give names to the threads in your process which can then be displayed by debuggers. This is a great idea, but the implementation is showing its age – it’s time for some fixes, or something better. Update, … Continue reading

Posted in Debugging, Programming, Visual Studio | Tagged , , , | 12 Comments

Programming is Puzzles

When I’m describing what I do for a living to non-programmers I sometimes say that I solve puzzles. I solve fascinating puzzles that are different every day, and there’s no answer key, and very often nobody else knows the solution. … Continue reading

Posted in Investigative Reporting, Performance, Programming, Visual Studio | Tagged , , , | 11 Comments