Code::Blocks Forums
User forums => Help => Topic started by: Killface on April 30, 2012, 05:18:26 pm
-
Sorry, for being a bit of a newb when it comes to programming. I've been working towards learning c++ and programming in general on my own with CodeBlocks, and it's been pretty fun so far.
But recently I find myself with an issue in Codeblocks 10.05, where the code seems to run exponentially slower on a Windows 7 64-bit machine, as opposed to the blazing fast execution on an half decade old 32-bit WinXP machine. For example the XP Machine will fully execute the code to completion in 15-20 seconds, whereas the Win 7 Machine might take upwards of 225 seconds.
I'm not really sure how to improve the performance. I did try to use one of the more recent 'nightlies'. Strangely enough, it ran pretty fast on the Win 7 machine at first, but then slowed to the usual crawl, and never repeated the fast start again on subsequent runs.
Any help would be appreciated.
-
I suggest posting the Compiler name and version.
You might try turning off virus scanner and other software to see it it makes a difference.
NOTE: Code::Blocks is an Editor/IDE not a Compiler.
Tim S.
-
If the code you've developed runs slower than this is not related to Code::Blocks, but to the compiler you are using. Try different optimisation level, for example and see, if that changes things. Alternatively you can try a more recent compiler, probably, but anyways you should better ask in a forum dedicated to the compiler you are using. C::B is just a front-end to the compiler so what the compiler does out of your code is not within the scope of C::B.
-
I'm using: tdm-mingw-1.908.0-4.4.1-2
C++ Compiler: mingw32-g++.exe
This might be a dumb question, but should I be using a 64-bit Compiler instead?
Right now I'm just trying to teach myself, so I'm not worried about producing code for a particular system.
-
I'm using: tdm-mingw-1.908.0-4.4.1-2
...try a more recent one. I recall that this compiler even had weird problems under Windows7 (But I might be wrong!).
This might be a dumb question, but should I be using a 64-bit Compiler instead?
Depends on if you want native 64 bit code (which would not run on 32 bit platforms). It also depends whether any (3rd party) libs you are using support 64 bit, too. Its up to you to take that design decision. There is nothing wrong with a 32 bit compiler under 64 bit Windows. And if you also target 32 bit platforms you'll certainly have to use a 32 bit compiler.
-
hello everyone ;D,
I had the same problem and I solve it (and I have too windows 7 64-bits),
maybe its the anti-virus, deactivate it and retry to compile.
if its work, you may manage exclusions in your anti-virus and allow codeblocks.exe and his process children to run freely.
I hope that will help you,
and sorry if my english was bad ::).
-
Sorry for the delay in getting back to you guys on this. I finally got a chance to sit down and really try what's been suggested.
Unfortunately, it appears the issue all along was the flash drive or rather how Windows 7 64-bit (or perhaps something else on the machine) was handling the reading/writing of the project files off the drive. For some reason it's almost blazing fast on a WinXP 32-bit machine from the middle of last decade, but horrifically slow on the Win 7 machine.
It only took me hours to figure this out today.
Anyway, thanks for the help everyone!