-
Notifications
You must be signed in to change notification settings - Fork 0
Performance
The development machine for Gopher2600 was an i3-3225 with 16GB of RAM. Host operating system throughout the development has been a Linux system (4.x series).
In playmode
I can get a sustained frame rate of 60fps capped and 113fps
uncapped. In debug mode, I can get around 42fps.
To get a performance rating for your installation you can run the following:
> gopher2600 performance -fpscap=false <rom file>
For performance measurement with the display you can press the F7
key while
playing a ROM to bring up the FPS indicator.
Memory usage is currently around 40MB of system memory in play mode
and around 120MB in
debug mode. This can vary on the ROM used however. It shouldn't ever be a
problem on modern hardware.
There are very few options available to improve performance of the emulator.
One thing you can do is to compile the project with at least version 1.17 of the Go compiler. This version of the compiler introduced a more efficient method of passing values to a called function.
Turning CRT effects off will likely have no effect.
For ROMs that use the ARM chip, setting the ARM to
immediate mode
will eliminate cycle counting and hence give a modest
performance boost.
For an in depth look at memory used, both playmode and the debugger can both be launched with a statistics viewer
. The viewer is available to view through a web browser at http://localhost:12600/debug/statsview
.
> gopher2600 -statsview <rom>
> gopher2600 debug -statsview <rom>
The screenshot below shows an example of the featured statistics. In this instance, this is the debugger running a 4k Atari cartridge (specifically, Pitfall).
Note that this feature requires you run a suitably compiled executable. The easiest way to do this is to use the Makefile
> make release_statsview
For people who really want to dig deep into the running program,
localhost:12600/debug/pprof/
gives more raw, but still useful
information.
For Go developers the Makefile can be used to run the emulator and to produce a CPU, memory or trace profile. All of these Makefile targets begin with the "profile".
For more on profiling Go programs see this Go blog entry.