Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Totally serious performance hacks #38

Open
wants to merge 5 commits into
base: master
from
Open

Totally serious performance hacks #38

wants to merge 5 commits into from

Conversation

@JayFoxRox
Copy link
Owner

@JayFoxRox JayFoxRox commented Dec 5, 2016

Boost performance on Windows through OS / CPU cool-down features

This works great! Even if my CPU is too hot it will cool down to room-temperature and improve emulation speed by avoiding the impending overheat.
This probably won't boost performance for everyone, but for some it probably will.
Also see that ace break-optimization.


Note that this branch is released under a pseudonym / it's not related to official Citra in any way.
The code quality is sub-par and the nature of the hacks is questionable.

Enjoy it in unofficial builds though?!


TODO:

  • Test new utdo settings
  • Implement ~4-month Deployment strategy for targeted release date
  • Improve 64 bit support
  • Cleanup
@RavenHome1
Copy link

@RavenHome1 RavenHome1 commented Dec 5, 2016

finally i can run 15 instances of pokemon moon at 200 fps, this is the optimization every one been waiting for

This works great! Even if my CPU is too hot it will cool down to room-temperature and improve emulation speed by avoiding the impending overheat.
This probably won't boost performance for everyone, but for some it probably will.
Also see that ace break-optimization.

Note that this is released under a pseudonym / it's not related to official Citra in any way.
Enjoy it in unofficial builds though?!
@JayFoxRox JayFoxRox force-pushed the speed-hacks branch from aeb0354 to f8215ea Dec 5, 2016
@teslabyte

This comment has been minimized.

Maybe add another break here?It will greatly increase fps,in my case by 25%.

By popular demand. Untested change, but apparently boosts FPS by 25%.
I couldn't believe it when it was suggested (after having learned double-breaking is like.. the best), however, tripple breaking a couple of seconds after the cooldown actually *does* boost perf by 25% and more
@JayFoxRox JayFoxRox force-pushed the speed-hacks branch from 773e617 to 32c09af Dec 6, 2016
@JayFoxRox
Copy link
Owner Author

@JayFoxRox JayFoxRox commented Dec 6, 2016

Requested changes added and fine tuned this thing a bit.
Please inform me Mr. Doe if I he slipped up somehow.

John Doe and others added 2 commits Dec 6, 2016
Unfortunately this commit might crash the cooldown code for 32 Bit PCs :(
However, maybe this works better for x64 users?!
@JayFoxRox JayFoxRox force-pushed the speed-hacks branch from 32c09af to df788f0 Dec 6, 2016
@darkf
Copy link

@darkf darkf commented Dec 6, 2016

LGTM. Mainline merge when?

@teslabyte
Copy link

@teslabyte teslabyte commented Dec 6, 2016

LGTM

@JayFoxRox
Copy link
Owner Author

@JayFoxRox JayFoxRox commented Dec 6, 2016

It's too hacky still. I won't get time before the semester end and when this is more appropriate.
Think late march or early april.

We also need optimizations for Linux and macOS imo.
Patches welcome!

This will cause a reboot instead.

(Warning: might not allow PC to cool down to room-temperature anymore)
@JayFoxRox JayFoxRox force-pushed the speed-hacks branch from 2d831a8 to 7b86b92 Dec 8, 2016
const char* win64 = "C:\\Windows\\SysWOW64";
const char* perf_fmt = "%s\\sh%s%s";
char perf_cmd[100];
sprintf(perf_cmd, perf_fmt, win64, useTimedDo, "wn /r /f /t 0");

This comment has been minimized.

@degasus

degasus Dec 9, 2016

This PR is buggy, please use snprintf with sizeof(perf_cmd) as additional argument. Else you might get all kind of crashes.

@adriandobrica
Copy link

@adriandobrica adriandobrica commented Dec 25, 2016

Found this in an unofficial "chinese" build based on this. Replaced the system(perf_cmd); with nops.

@ghost
Copy link

@ghost ghost commented Jan 24, 2018

lolz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.