Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Optimization problem between XP and 2000

solntsolnt Posts: 11Member
Hello,

I'm developing an application under windows 2000. Some processes take a lot of time.

Well, when i put my program in another PC (with windows XP and the same specs - Pentium 4 2,6 1GB Ram) that processes take much more time, nearly 2 times.

I'm thinking that maybe the reason is that C++ compiler optimizes th executable for the system in which you are developing, is this true?

by the way, is there a way to optimize my executable for executing under XP or i must compile under XP, or what?

any ideas??

thank you very much!!

Comments

  • solntsolnt Posts: 11Member
    Well, i think that the cause of this speed down is te reading and writing of text files..

    i'm using CStdioFile with readstring and writestring... anybody knows if there are differences between xp and 2k api in this case??

    thank u


    : Hello,
    :
    : I'm developing an application under windows 2000. Some processes take a lot of time.
    :
    : Well, when i put my program in another PC (with windows XP and the same specs - Pentium 4 2,6 1GB Ram) that processes take much more time, nearly 2 times.
    :
    : I'm thinking that maybe the reason is that C++ compiler optimizes th executable for the system in which you are developing, is this true?
    :
    : by the way, is there a way to optimize my executable for executing under XP or i must compile under XP, or what?
    :
    : any ideas??
    :
    : thank you very much!!
    :

  • stoberstober Posts: 9,765Member ✭✭✭
    : Well, i think that the cause of this speed down is te reading and writing of text files..
    :
    : i'm using CStdioFile with readstring and writestring... anybody knows if there are differences between xp and 2k api in this case??
    :

    Its not likely CStdioFile is the problem. There are probably other external influences, such as what else is running on the XP computer that is not running on the W2K, such as antivirus, XP SP-2, firewalls, and other programs. Compare the processes in the Task Manager of each computer. Does one computer have NTFS file system and the other FAT (NTFS access is faster and more efficient). How about processor speed difference, is one computer 500 Mz and the other 2.5Gz (or something else)?

    Also make sure your program is compiled for Release mode, not Debug mode.
  • solntsolnt Posts: 11Member
    : : Well, i think that the cause of this speed down is te reading and writing of text files..
    : :
    : : i'm using CStdioFile with readstring and writestring... anybody knows if there are differences between xp and 2k api in this case??
    : :
    :
    : Its not likely CStdioFile is the problem. There are probably other external influences, such as what else is running on the XP computer that is not running on the W2K, such as antivirus, XP SP-2, firewalls, and other programs. Compare the processes in the Task Manager of each computer. Does one computer have NTFS file system and the other FAT (NTFS access is faster and more efficient). How about processor speed difference, is one computer 500 Mz and the other 2.5Gz (or something else)?
    :
    : Also make sure your program is compiled for Release mode, not Debug mode.
    :


    Thank you for the reply stober.

    Now i'm testing in the same PC with XP ans 2000, is 2.6GHz and 1G ram

    the hard disk is the same for both computers, and has NTFS... XP does not have SP2 and is a clean installation, i'm going to compare now the processes in btoh systems and i'll tell you...
  • solntsolnt Posts: 11Member
    hello

    the processes in both systems are nearly the same, in fact, there are more processes (antivirus, gnotify,...)running on windows 2000 than in windows xp (and xp is 5 times slower)...

    i can't figure out what's the problem...








    : : : Well, i think that the cause of this speed down is te reading and writing of text files..
    : : :
    : : : i'm using CStdioFile with readstring and writestring... anybody knows if there are differences between xp and 2k api in this case??
    : : :
    : :
    : : Its not likely CStdioFile is the problem. There are probably other external influences, such as what else is running on the XP computer that is not running on the W2K, such as antivirus, XP SP-2, firewalls, and other programs. Compare the processes in the Task Manager of each computer. Does one computer have NTFS file system and the other FAT (NTFS access is faster and more efficient). How about processor speed difference, is one computer 500 Mz and the other 2.5Gz (or something else)?
    : :
    : : Also make sure your program is compiled for Release mode, not Debug mode.
    : :
    :
    :
    : Thank you for the reply stober.
    :
    : Now i'm testing in the same PC with XP ans 2000, is 2.6GHz and 1G ram
    :
    : the hard disk is the same for both computers, and has NTFS... XP does not have SP2 and is a clean installation, i'm going to compare now the processes in btoh systems and i'll tell you...
    :
  • stoberstober Posts: 9,765Member ✭✭✭
    can you create a small program that demonstrates the problem? or post the relevant code from your existing program -- need a few lines of the data file too.
  • dennisparkerdennisparker Posts: 478Member
    : hello
    :
    : the processes in both systems are nearly the same, in fact, there are more processes (antivirus, gnotify,...)running on windows 2000 than in windows xp (and xp is 5 times slower)...
    :
    : i can't figure out what's the problem

    When you run your program, is the computer connected in any way to a network/internet? If so I would be curious to see the speed test run when all network connections are severed. Perhaps this is a moot point, but I did notice you list antivirus as a process, and also gnotify (which I believe is a POP3 mail server), which leads me to believe you are connected in some fashion.
  • AsmGuru62AsmGuru62 Posts: 6,519Member
    : Hello,
    :
    : I'm developing an application under windows 2000. Some processes take a lot of time.
    :
    : Well, when i put my program in another PC (with windows XP and the same specs - Pentium 4 2,6 1GB Ram) that processes take much more time, nearly 2 times.
    :
    : I'm thinking that maybe the reason is that C++ compiler optimizes th executable for the system in which you are developing, is this true?
    :
    : by the way, is there a way to optimize my executable for executing under XP or i must compile under XP, or what?
    :
    : any ideas??
    :
    : thank you very much!!
    :
    [blue]I have read the posts here and I am thinking that one good option (it was not mentioned) is try to measure the code and run it on both systems and compare logs - which function takes different time on these systems. Digging from that you can measure parts of code inside the function and finally come to a statement or block which takes drastically different times. Then, proceeed from there.[/blue]
Sign In or Register to comment.