Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Tier 2, running app with debugging is faster than release

Author
Message
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 23rd Jan 2018 08:38 Edited at: 24th Jan 2018 09:37
Hi I have a small pathfinding app, when I run it with debugging it is running faster than if I compile it as release and run it. Shouldn't release be faster? What am I doing wrong? I am using Visual Studio 2017 x64.

EDIT: I am using the AppGameKit VS2017x64 template, here is a small example that runs faster when debugging and slower when running release exe.

13/0
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 24th Jan 2018 09:40
Could someone confirm this on their machine? When running with the debugger, FPS average during 4000 frames is something like 4200 FPS, but running a release exe it is something like 3600 FPS during 4000 frames.
13/0
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th Jan 2018 10:24
i have vs 2017 installed, i can test this evening ..
AGK (Steam) V2017.12.12 : Windows 10 Pro 64 Bit : AMD (17.12.1) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 24th Jan 2018 12:56
Thank you Markus
13/0
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th Jan 2018 19:49
i used the menu template attributes, there the release c/c++ optimization and now its same speed


AGK (Steam) V2017.12.12 : Windows 10 Pro 64 Bit : AMD (17.12.1) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 25th Jan 2018 09:19 Edited at: 25th Jan 2018 09:41
Quote: "i used the menu template attributes, there the release c/c++ optimization and now its same spee"


What exactly did you do? I set the configuration to release and c/c++ optimization to Full Optimization, but pressing F5 to start debugging is still way faster than running the EXE file.

EDIT: Running EXE as admin makes it faster, but still not as fast as "F5" debug in VS2017.
13/0
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th Jan 2018 17:03
i believe i set it to faster code instead of size. my tests was only from ide and with this simple for next loop. not really challenging.
maybe the code contains a conditional compilation arguments.


AGK (Steam) V2017.12.12 : Windows 10 Pro 64 Bit : AMD (17.12.1) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 26th Jan 2018 12:04
Quote: "my tests was only from ide and with this simple for next loop"


Yes, I was being unclear before (I am in the process of learning C++ proper), when I run from IDE, release is much faster than when I run the compiled EXE file directly from its folder (not from IDE).
13/0

Login to post a reply

Server time is: 2024-04-25 18:23:21
Your offset time is: 2024-04-25 18:23:21