Moderator: Andres Valverde
Gian-Carlo Pascutto wrote:It makes no sense to talk about the speed of code generated by "GCC" if you don't mention the used version.
Gian-Carlo Pascutto wrote:Latest GCC is 3.4
Gian-Carlo Pascutto wrote:You are right, but I would not use GCC 4.0.0 or 4.0.1 for anything yet.
Unless you play against me in a tournament, then you should certainly use it :-P
Tord Romstad wrote:Gian-Carlo Pascutto wrote:You are right, but I would not use GCC 4.0.0 or 4.0.1 for anything yet.
I've been using GCC 4.0.0 exclusively for the last few months, and I have never seen any problems. The only difference I have noticed compared to GCC 3.3 is that my program runs 10-15% faster. You could argue that my program is just a simple little toy which is not likely to trigger any obscure bugs or problems in the compiler, but if I recall correctly most of Mac OS X 10.4 is also compiled with GCC 4.0. When it's good enough to compile a modern OS with, I would say it is mature and stable enough for most purposes.
Unless you play against me in a tournament, then you should certainly use it :-P
If I ever play against you in a tournament, the compiler won't matter at all. Glaurung wouldn't have the shadow of a chance -- Sjeng is in a completely different class.
Eduardo Waghabi wrote:My story:
I’ve been using CygWin’s gcc compiler. With –O1 options I get the fastest code, -O2 is almost the same as no optimizations and –O3 compile even slower code. So I was thinking if I should try to mess with each optimization flag to try to get the best result.
I’ve always been suspicious about the effects of cygwin1.dll on my engine’s speed. So I decided to give DJGPP a try and it actually compiled slower code. Before I try Microsoft C++, I thought I should ask here if I should bother at all.
My questions:
What is, in your opinion, the fastest Win32 compiler?
What is you experience with CygWin? Do you think its code is slow?
Do detailed study of the compiler’s optimization flag pays off, or one should stick with the standard optimization options?(e.g. the –O1, 2 and 3 options of gcc)
Bryan Hofmann wrote:It depends on the platform you want to compile for, since you mention that you are using CYGWin I will assume you are looking for a Windows based compiler. The fastest I have tested is the MS Visual C++ 2005 Beta 2. This will as far as I know is available via MSDN subscriptions. The next would be MS Visual C++ 2005 Express, this can be had for free but will expire when the 2005 is released. If you look for free and fast then you best choice is MS Visual C++ 2003 .NET (command line only). You can download it at http://msdn.microsoft.com/visualc/vctoolkit2003/ . After you have installed it you will need to download the Core SDK http://www.microsoft.com/msdownload/pla ... sdkupdate/ .
Bryan
Joachim Rang wrote:Bryan Hofmann wrote:It depends on the platform you want to compile for, since you mention that you are using CYGWin I will assume you are looking for a Windows based compiler. The fastest I have tested is the MS Visual C++ 2005 Beta 2. This will as far as I know is available via MSDN subscriptions. The next would be MS Visual C++ 2005 Express, this can be had for free but will expire when the 2005 is released. If you look for free and fast then you best choice is MS Visual C++ 2003 .NET (command line only). You can download it at http://msdn.microsoft.com/visualc/vctoolkit2003/ . After you have installed it you will need to download the Core SDK http://www.microsoft.com/msdownload/pla ... sdkupdate/ .
Bryan
I have downloaded and installed both. I have build .obj-Files wiht vctoolkit. Now how do I build exes? If I start SDK and type nmake it says file not found...
regards Joachim
Bryan Hofmann wrote:
From the MS Visual C command prompt in the fruit source directory;
cl /O2 /GL *.cpp
I don't use make files nor do I use GUI's ,command line only.
Joachim Rang wrote:if I try to compile Fruit there is an error: windows.h Cannot open Include file not found. I guess some variables are not set correct on my machine.
Alessandro Scotti wrote:Joachim Rang wrote:if I try to compile Fruit there is an error: windows.h Cannot open Include file not found. I guess some variables are not set correct on my machine.
There is a batch file named vcvars32.bat that you must execute first, it will set all the required environment variables.
Joachim Rang wrote:I know and I executed this. Unfortunately it didn't work. But now after manually copying the lib and include folder from sdk to visual toolkit it works. I think not the standard procedure but who cares.
Alessandro Scotti wrote:Joachim Rang wrote:I know and I executed this. Unfortunately it didn't work. But now after manually copying the lib and include folder from sdk to visual toolkit it works. I think not the standard procedure but who cares.
Ops, I didn't notice you had the SDK separated from the compiler! Copying is definitely ok if it solves the problem! Anyway, my vcvars32.bat only sets three variables: PATH, INCLUDE and LIB. Probably you can get the same result by adding the SDK path to INCLUDE and LIB... just guessing though.
Set PATH=C:\Program Files\Microsoft Platform SDK\bin;C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;%PATH%;
Set INCLUDE=C:\Program Files\Microsoft Platform SDK\include;C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;%INCLUDE%
Set LIB=C:\Program Files\Microsoft Platform SDK\lib;C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;%LIB%
Return to Programming and Technical Discussions
Users browsing this forum: No registered users and 44 guests