Windows 7 versus the Intel Atom CPU !

I read something interesting today, which is worth noting. In summary, it appears that the Intel CPU may lose ground with Microsoft Windows 7 when it comes to Tablet PC’s.  Just the idea of Windows running on ARM (let’s see what is announced as CES) CPU’s scares me and confuses me. Why ?

The main reason is that all of my software development is based on Intel chips, but it concerns me also because maybe it says something about the Windows operating system itself. Is Windows making Intel chips look bad ? That is a valid question.

Don’t get me wrong, I really like Windows and I think Windows 7 is quite good (although I don’t like every change to the user interface they have made, such as Windows Explorer).  I believe the problem is that Windows no longer taps into the strengths of the CPU’s it runs on. Why do I say that ?

Let’s look at some PowerBasic code for a minute:

     REGISTER X AS LONG, Y AS LONG
     DIM t AS DOUBLE
     LOCAL I AS LONG
     x = 1
     y = 1
     t = TIMER
     FOR i = 1 TO 10000000
          x = x * y
     NEXT
     t = TIMER - t
     MSGBOX FORMAT$(t,".0000")

This code was compiled using the PowerBasic 9.0 compiler. Powerbasic (the company), in my opinion, are experts with the Intel CPU machine code language and they know how to squeeze every bit of speed out of an Intel chip.  The above code executes a simple loop with a simple calculation (multiplication is slower than addition and the same code with addition runs 5 times faster) 10 million times (10,000,000). Now how long does my 2.5 ghz Intel  Celeron CPU take to run the above code ?  Just .078 seconds. Thats 78 thousands of a second (78 milliseconds). Just think, my computer (and its not a multicore or anything special, but just a simple mass market Celeron CPU which is now about 7 years old) can do the math calculation X = X * Y,   ten million times in less than 1/10th a second.

That is fast !  I appreciate how fast the common Intel CPU is today. I have been programming computers since the days of the Commodore 64 which had only a 1 mhz CPU. I learned 6502 machine language just so I could write a simple video game and you would be amazed at how much one could do with a 1 mhz CPU. Today, most CPU’s are thousands of times faster than that old C64 CPU.  When I was writing most of my custom software (for local businesses) back in the 90’s, most of my customers had computers in the 100 mhz range and they could do a lot. Businesses could do business with such PC’s. You could browse the internet and much more.

Now Intel has their Atom series of CPU’s which are lightweight and require less power. They are perfect for the new generation of Tablet PC’s. But there is one problem. The primary operating system for Intel chips is Windows and personally I think Windows is making Intel chips look bad. It doesn’t have to be this way though. I think the problem is more associated with how software is written today, rather than a product of Windows itself. Look at Windows 95 for example. It runs well even on a 486 CPU with minimal memory. Where I see a problem is with the programming languages used by most major companies today, even Microsoft itself (they design a lot with their own languages).

Back in the DOS days, compiler makers concentrated not only on features, but on speed and efficient use of memory. The problem is that as CPU”s, harddrives and memory improved, compiler (programming language) makers started getting sloppy and started to not care any more about speed or size of an application (effects memory usage). Windows has become a mess, because Microsoft keeps adding more and more stuff running in the background. Windows is multitasking so we the users can run more than one application, not so Microsoft can waste CPU cycles by throwing all sorts of stuff running in the background just to solve problems in how they designed Windows.

Now Windows is becoming overly COM based, even to the point of new functionality in the operating system being added via COM objects (Interfaces), rather than via new API’s (functions).  COM was suppose to make programming easier and make code more reusable, but in many ways in my opinion it has bloated the operating system.  COM overloads the Windows Registry and this can slow Windows to a snails pace over time (I know, my 7 year old XP computer is feeling the pain of a bloated registry). COM adds extra CPU cycles to many simple tasks. Now we have the dot.net stuff to add bloat to the operating system. Its not just COM, but it appears the programming style of coders today effect size and speed of applications.

Windows, and many modern programming languages, are making the Intel CPU’s look bad, because software is doing too much and wasting CPU cycles. I write software, like I did years ago, trying to keep things small in size and as fast as possible. Powerbasic really makes a difference because it probably can squeeze more out of an Intel chip than most other modern programming languages. Now I also feel that my style of coding makes a difference too. One thing is I stay away from COM as much as possible. OOP (object oriented programming) is not the panacea everyone thinks it is either. I do though concentrate on code reusability, but via functions and subs, rather than COM classes.

My point is that maybe the real problem with Intel CPU’s is how we write software and not the CPU’s.

I do find it curious though, that when I visit most computer and programming online magazines that when I do a search for the name Powerbasic, I usually find absolutely nothing. Now do a search for C# or VB# (or whatever VB dot.net is called today) on such sites and you will find tons of information. Maybe Intel ought to take a closer look at PowerBasic compilers, since it would make their CPU’s look better.

If Microsoft wants to really make Windows 7 a viable platform for Tablet PC’s, rather than jump the Intel ship to ARM (but will they do any better with ARM) maybe they need to take a closer look at how they write software. I see so much discussion on the web about how the Intel Atom CPU’s in Netbooks run Windows poorly, but I don’t think the Atom chips are the real problem here.  My EZSprite (2D Sprite) engine, written using PowerBasic, is only a 38 KB DLL and is a 100% software (meaning the CPU does all the work) based graphics engine and it “flies” on an Atom CPU found in a Netbook.  It takes advantage of the power of the Atom CPU, rather than wastes it.

I do a lot of stuff in my GUI engine software (EZGUI) using DIB’s (device independent bitmaps) where the code is modifying millions of pixels, which really puts all the work on the CPU (not hardware based like DirectX) and I get great speed out of my software.  I write all my software on a 7 year old XP computer, with just a simple 2.5 ghz Intel Celeron chip (aka. cheap!) and only 768 meg Ram. That is considered obsolete by most standards today.  When I wrote previous versions of EZGUI, I did a lot of testing on a 500 mhz computer running Windows 95. If my software runs well on a much older and slower PC, then I feel comfortable that it should run extremely well on the latest computers. Also I am not one of your typical programmers who always has to have the latest PC hardware (ie. multi-core CPU’s with high end video cards). Maybe thats why a lot of programmers find it a challenge to write software which is fast and lean (small in size requiring less resources). Sure if you design your software on the latest high end hardware, you won’t notice if your software is bloated and slow. The new tablet PCs offer a challenge to programmers. Tablet’s running Windows on Intel based chips, won’t give you the high end speed of your typical high end desktop, so they will quickly show up the flaws in software design.

Time will tell whether Windows 7 will succeed (at least on Intel CPU’s) in the Tablet PC market.

Update:  I have been reading more articles on the web about Windows 7 and tablet PC’s and things don’t look much better from what I have read. I have found though that programmers tend to write software for the “bleeding edge” rather than for the average consumer PC.  I have actually been laughed at by some just because I still support Windows 95 in EZGUi 4.0 Pro. Maybe all the custom software I have written in the past, made me consider the needs of the average small business who don’t want to have to keep updating their computer hardware every couple of years, just so their software will be able to run. That is a waste of money and resources. I will be taking a closer look at what Intel does, with their next generation of low powered CPU’s. The “Sandy Bridge” CPU’s sound very interesting.  All the computers I currently use for development (XP) and testing (Vista and Windows 7) are mass market PC’s from Walmart or Best Buy. I don’t like to develop on the “bleeding edge”, but rather develop on average mass market PC’s. EZGUI’s sprite engine and 3D OpenGL based control run quite well on my Windows 7 PC which I purchased from Walmart (clearanced for just $298). I will be interested to see how well OpenGL is supported in Tablet PC’s, since I chose OpenGL over DirectX.

Note:  Microsoft and Windows are trademarks of Microsoft Corporation, Intel is a trademarke of Intel Corporation. The Computer Workshop is not affiliated with either of these companies.