Monday

Microsoft: Win XP sometimes Faster than Vista SP1

Windows XP sometimes handles common consumer and business tasks faster than the new Windows Vista SP1, Microsoft's own tests show.Part 1 of a special five-part series.

Windows XP is faster than the new Windows Vista Service Pack 1 (SP1) in completing common consumer and business tasks on PCs coming out of sleep mode, but the differences are slight.

The performance tests, conducted by Principled Technologies Inc. on Microsoft's behalf, showed that the older XP operating system remained faster than Vista SP1 in 61% of the operations grouped in a consumer test suite, and faster than Vista SP1 in 46% of the operations in the business-oriented head-to-head.

The results were from time trials held on identical PCs after they'd come out of standby, a power-saving feature in Windows. Vista, like other operating systems, including Apple Inc.'s Mac OS X, calls the same mode "sleep."

However, when the same tests were run after a cold boot -- with the PC's power turned on, the OS booted and the scripts run after two minutes -- Vista SP1 came out on top in 74% of the tested consumer functions, and 66% of the business operations.


Differences Were Small

But no matter which operating system came out on top, the differences were small in virtually every case, said Principled Technologies. The total difference between XP and Vista SP1 in the 31 consumer tasks, for instance, was less than 5 seconds; of the 64 chores in the business scenario, 60 sported a difference of under half a second.

"Overall, Windows Vista SP1 and Windows XP performed comparably on most test operations," Principled Technologies concluded in its report.

The tests were run on four systems -- two notebooks, two desktops -- from Dell Inc., Hewlett-Packard Co. and Toshiba Corp.

A fifth system, another HP desktop, was omitted from the aggregate results because it, "produced unacceptably high variability in its test results," according to Principled. Interestingly, that system showed XP was faster than Vista SP1 in more chores than any of the other test machines. In the consumer test set, for example, XP was faster than Vista SP1 in 74% of the operations immediately after a reboot of the discarded HP.

Windows XP performed much poorer on the dropped HP in the business tests; it was faster than Vista SP1 only 31% of the time, lower than the average of the other four PCs. But when it came out of standby, XP beat Vista SP1 in 53% of the business-oriented jobs, a higher percentage than the other machines.

That, among other things, touched some nerves. Several users commenting on Microsoft's official Vista blog - where mention was made of the tests - took exception to Principled's conclusion that Vista SP1 and XP produced comparable results.

"Hard to believe when every other review site on the planet shows pretty much hands down [Vista] is slower on similar hardware," said a user identified as Ceinach. "I didn't even think this was a point of argument anymore. This statement is fairly stunning.... It's like Microsoft is claiming the earth is still flat."

Computerworld's own tests, for instance, showed that file copying -- a function Microsoft has said it spent considerable effort improving in SP1 -- remained much slower on Vista than on Windows XP.


SP1 Doesn't Give Much of a Boost

Principled Technologies also put Vista SP1 up against the pre-service pack version of the operating system. When armed with SP1, PCs finished 87% of the consumer chores faster than plain Vista, and wrapped up more of the business operations faster as well. But the speed improvements were meager, said Principled. Most of the business tests were completed just fractions of a second faster by Vista SP1 than by Vista.

"Overall, Windows Vista SP1 was more responsive than Windows Vista on most comparisons," the report stated. "Performance differences between the two operating systems were typically less than a quarter second."

Users noticed that, too. "All that work on Service Pack 1 and it's only a quarter second faster?" asked a user pegged as "eponymousnyc."

The two reports, one that outlines the consumer tests, the other for the business tests, can be downloaded in PDF format from Principled Technologies' site.

Readers Who Read This Page, Also Read:

Bypassing Vista SP1 Windows Genuine Advantage

A Closer Look at Windows Vista Service Pack 1 Beta

Alienware Curved Monitors-The Next Technology?

What's Next After Windows Vista?

C Program Without a Main Function

How to write a C program without a main function?.Is it possible to do that.Yes there can be a C program without a main function.Here's the code of the program without a main function...

#include<stdio.h>

#define decode(s,t,u,m,p,e,d) m##s##u##t
#define begin decode(a,n,i,m,a,t,e)

int begin()
{
printf(" hello ");
}


Yes, the above program runs perfectly fine even without a main function.But how,whats the logic behind it?

Here we are using preprocessor directive #define with arguments.The '##' operator is called the token pasting or token merging operator.That is we can merge two or more characters with it.

NOTE: A Preprocessor is program which processess the source code before compilation.

Look at the 2nd line of program-

#define decode(s,t,u,m,p,e,d) m##s##u##t

What is the preprocessor doing here.The macro decode(s,t,u,m,p,e,d) is being expanded as "msut" (The ## operator merges m,s,u & t into msut).The logic is when you pass (s,t,u,m,p,e,d) as argument it merges the 4th,1st,3rd & the 2nd characters(tokens).

Now look at the third line of the program-

#define begin decode(a,n,i,m,a,t,e)

Here the preprocessor replaces the macro "begin" with the expansion decode(a,n,i,m,a,t,e).According to the macro definition in the previous line the argument must de expanded so that the 4th,1st,3rd & the 2nd characters must be merged.In the argument (a,n,i,m,a,t,e) 4th,1st,3rd & the 2nd characters are 'm','a','i' & 'n'.

So the third line "int begin()" is replaced by "int main()" by the preprocessor before the program is passed on for the compiler.That's it...

The bottom line is there can never exist a C program without a main() function.Here we are just playing a gimmick that makes us beleive the program runs without main function.But here we are using the proprocessor directive to intelligently replace the word begin" by "main" .In simple words int begin()=int main().

Is you are still not able to understand the code plz pass comments.I'll try to clear your thoughts..

Readers Who Read This Page, Also Read:

A Self Destruction Program In C

A Guessing Game In C

A C Program To Generate Random Numbers

Pigeon Breeding Problem Solved

Saturday

Guessing Game In C

This is a small guessing game written in C.In this guessing game you have to guess a number between 0 & 100.You have 8 chances to do that.Every time you guess wrongly the program will give you a hint that your guess is too high or your guess is too low.Based on this hint you have to guess the number in the remaining attempts.Here's the code

#include<stdio.h>
#include<stdlib.h>
#include<time.h>

void main()
{
int num,guess=-1,tries=0,pass=0;
time_t t;
srand((unsigned)time(&t));
num=rand()%100;
while((guess!=num)&&tries<8)
{
printf("Enter the guess num b/w 0 & 100 (you have %d tries left out)\n",(8-tries)); scanf("%d",&guess);
tries++;
if(guess==num)
{
printf("Hurray you guessed it correctly!!!\n");
pass=1;
}
else if(num< guess)
printf("Your guess is too high\n");
else
printf("Your guess is too low\n");
}
if(pass==0)
printf("Sorry you lost! The correct number is %d\n",num);
}

Readers Who Read This Page, Also Read:

A C Program Without A Main Function

A Self Destructing Program In C

A C Program To generate Random Numbers

How To Create A Computer Virus In C

A Self Destructing Program in C

This program will destroy itself upon execution.The program will cause the .exe file to be deleted upon execution.That is this program is capable of destroying itself upon execution.Heres the code

#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
printf("This program will destroy itself if u press any key!!!\n");
getch();
remove(_argv[0]);/*array of pointers to command line arguments*/
}

HOW TO COMPILE ?
Load the source code to the compiler and compile(press Alt-F9) and then press F9.This will generate the .exe file in the current directory(Bin directory).Execute this .exe file it will destroy itself upon execution.

Readers Who Read This Page, Also Read:

How To Create A Virus In C

A C Program Without A Main Function

A C Program To Print It's Own Source Code

A Simple Password Program