Slow Compiling & Running in any environment

I am using NetBeans IDE 8.0.1 at the moment but tried also with Dev c++ and Codeblocks.
When i compile or run sometimes it takes 2-3 seconds to complete and sometimes 1 minute or more it changes on the same code randomly.
When it is slow on NetBeans its showing console windows all the time closing imediatelly and after a while it is completed successfully or there are times ending with Blue screen. Console windows are showing too when i start NetBeans but only 3-4 times and it starts. With Dev c++ there aren't console windows showing up but it takes the same time to compile any code and happens randomly also.
I am using Windows 7 32bit. I have used Windows xp before and it was the same problem there too..By the way all other stuff on computer works good and computer is fast only have problem with this..
So if anyone knows what could be the problem .. :)
Topic archived. No new replies allowed.