This blog has moved. Please update your bookmarks.

May 9th - 16th, 1940: The Fall Of France

I'm reading the memoirs of Sir Winston Churchill: The Second World War, and have just come to the first week of the battle of France.

During the night of May 9th - 10th, 126 German infantry divisions and 10 Panzer divisions began their full attack on the Low Countries and France. It occurred with no previous warning, and the German troops acquired near-total surprise at every point in their attack.

The army plan of the French, called Plan D, consisted of an immediate occupation of Belgium, in the case of a sudden outbreak of war. Belgium had stubbornly refused to take sides in the conflict, believing that their strict neutrality would protect them. Ironically in retrospect, both Germany and France had battle plans prepared that called for an immediate occupation of Belgium as soon as the war broke out.

At 5.30 am, May 10th, Lord Gort recieved a message from General Georges, ordering "Alertes 1, 2 and 3"; instant readiness to move into Belgium. At 6:45 am, General Gamelin ordered the execution of Plan D, to meet the German attack in Belgium.

The move into Belgium quickly took place. On May 13th, the line from Antwerp to Montmédy (the start of the Maginot line), was stretched along the Dyle and Meuse rivers. The 7th French Army held Antwerp; Belgian forces continued south until Louvain, which was held by the British Expeditionary Force; then the 1st French until Namur, the 9th French held the long stretch from Namur-Dinant-Givet-Sedan, where the 2nd French Army took over and began the Maginot line.

The 9th Army was not in good fighting spirits. Consisting of 9 divisions, two of which were cavalry, another two reserve and the rest hardly up to par with French standards, it held a section of the front which was thought impassable: the Ardennes forest. The bulk of the French army held the Maginot line, the rest were in the process of occupying Belgium along with the British Expeditionary Force.

Facing the 9th Army was the German Army Group A, 44 divisions under General von Rundstedt; heavily motorized and capable of quick movement and featuring a heavy thrust of Panzer divisions. Carefully advancing through the forest, finding it not particularly impassable at all to modern transportation and engineering efforts, they quickly emerged at Sedan to begin their onslaught on the wary French.

It didn't take long before things collapsed. During the 13th of May (four days into war) Lord Gort's headquarters began to sense the awful thrust of the Germans upon the 9th Army. German forces broke through at Sedan during the 14th and continued to pour en masse over the Meuse, scattering the remnants of the 9th before them. In the north, the Belgians fell back to the Antwerp defenses, the 7th Army recoiled as quickly as it had attacked, and the British were under intense fight, especially the 3rd Division under General Montgomery.

At about 7:30 am in the morning on the 15th of May, Churchill got an urgent telephone call from a distressed M. Reynaud of the French government, saying, "We have been defeated. We are beaten; we have lost the battle." Churchill initially refused to accept this statement, having seen lots of similar breakthroughs in the lines from the war 1917-1918, and they had always been able to stop the advance, not the least because of the inherent logistics problems of the advance. The situation was still in many ways similar to the fronts of the last war, and he felt that there were many reasons to believe that the situation would play out in similar fashion.

At 3 pm on the day after, the 16th, Churchill flew to Quai d'Orsay in Paris. He met with M. Reynaud, M. Daladier, General Gamelin and other representatives of the French High Command. The French were in a state of panic, he described, with "utter dejection written on their faces". The Commander-in-Chief explained the sitation, that the Germans had broken through and were instoppable in their onrush towards either Amiens at the coast, or possibly Paris. Churchill replied "But where are the reserves? Oú est la masse de manoeuvre?" He was met with a shrug from General Gamelin. "Aucune."

There was a long pause in the conversation as the awfulness of the situation sank in. Churchill wrote in his memoirs that he was dumbfounded at first, but that he wanted to do everything possible to counter-attack (and pressed this matter to some extent in the meeting); for which he, however, was in little position to do as the British forces were rather small and, furthermore, directly under the control of the French. Not that it would have mattered much, he realized later during the course of the war, but he sought first and foremost to quench this panic and fear that riddled the French government and military leadership at this moment. Through the windows of Quai d'Orsay he could already see the officials heaping wheelbarrows of documents into large bonfires. They were already burning the archives and preparing for the evacuation of Paris.

The truth is that there were no reserves in position to meet this advance. All the troops were either north or south and could not be redeployed in time. Even if they could, they probably would not have been able to stop the fierce onslaught of the German army, so different in spirit and effect than from the last war 1914-1918, which was still in fresh memory; and from which the lessons learned were applied with vigor. "Inferiority of numbers, inferiority of equipment, inferiority of method", as General Gamelin adequately described the situation.

It took one week. The battle for France was over in three.

Is there a point to this? No, no point in particular. I am just amazed that the future of the entire continuation of the war, and the outset of the entire world, all changed in this one fateful week. The long wait of the Sitzkrieg through the winter and spring ended here, suddenly and violently, in utter defeat.

I Love Optimizing Components

Yesterday I managed to take one of our older components and optimize it so much it actually scared me. It's a component that reads about 1000 language texts into memory and enabling the software to be multi-lingual.

Before optimization began, it took about 700 ms to load and parse the file. Clearly too much for a measly 1000 rows.

In mid-optimization, I had cut the time down to 130 ms, but I still thought that was a little bit too much. I decided to optimize the parsing further; there was a portion where we had a very repetitive string addition,

    Result := Result + p^;

and I decided to skip that step and just count characters and copy the entire string through StrMove instead when I was done. The result: I cut the total time down to 30 ms; including loading, parsing and sorting the file. That's about 95% of execution time slashed away.

An added bonus was that I could optimize the language lookup function too, using a binary search routine, reducing text lookups from O(n/2) to O(log2(n)). The effect was that our main program ran about twice as fast, as perceived by me and my colleagues.

It just goes to prove that sometimes, by focusing on the worst 1% of the code, you can reap enormous benefits. Yay!


Blog contents copyright © 2005 Mats Gefvert. All rights reserved.