Performance Test in Windows 8 developer preview

September 25, 2011

In the past I’ve done a fair amount of UI development using WPF and Silverlight and at times we have run into issues with the performance of binding.  So, with Windows 8 we now can write C++ applications using Xaml.  You would think the performance of C++ compared to C# would be vastly superior; well maybe not…  I wrote a simply little test that has creates 100 TextBox elements and links them together such that when the first element is changed it causes a cascading update all the way back to the last TextBox.

The results were quite interesting…  The C++/Xaml app took on average about 42.9 ms to do the update while the C#/Xaml took 38.4 ms.  Hmmm, I would have expected much bigger difference than 4.5 ms.  Also in the test I measured the total initialization time (i.e., the time it took to create the 100 TextBox elements).  Here is the big surprise… It took C++/Xaml on average about 1735 ms to initialize while C#/Xaml took 464 ms.  That’s quite a big difference, I can’t explain the difference but would be interesting to know what results others see.

Links to the code are below: one for C# and another for C++.

Note: Tests were performed using Window 8 developer preview on Acer tablet I got at PDC a few years ago.


Windows 8 developer preview

September 25, 2011

Got Windows 8 developer preview loaded on my old Acer tablet that I received for free at PDC a couple of years ago. It actually runs quite nicely on such old hardware! The best way I found to get it up and running was to setup a bootable VHD. Scott Hanselman had some great instructions: