VOGONS


Fast DOSbOX?

Topic actions

First post, by Patrick

User metadata

http://sourceforge.net/projects/fastdosbox

What exactly is this and how do I get it to work? Plain DOSBox runs pretty badly on my system..

Reply 2 of 7, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

What is that? A Real Time Clock patched version?

Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)

Reply 3 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

no some code optimalisations

Some make sense.
but some don't (no offense)

The coder changed a lot of multiplies into bitshifts (good thing)
but also precalculated certain values. (like 8*1024)
That isn't needed. I tested the following:

#include <iostream>

int main(int argc,char* arv[]) {
std::cout << 144 << std::endl;
return 0;
}

Which gave exactly the same results as:

#include <iostream>

int main(int argc,char* arv[]) {
std::cout << 12*12 << std::endl;
return 0;
}

the resulting execatables were the same. Maybe this isn't true when used in calculations.
The author frequently changed:

if (y&1) off+=8*1024;

to

if (y&1) off+=8192;

I doubt that makes any difference

However most of the bitshifts might work.

Futher the author implemented a jumptable FPU core.
Might be good. but it was based on 0.63 source and the current source is lot different

He might have done more things. but these were the things I noticed. while quickly browsing the source.
Those bitshits in in the main cpu loop might be a good thing to do.

Water flows down the stream
How to ask questions the smart way!

Reply 4 of 7, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Creating a seperate project seems somewhat unnecessary since the effort could be spent on improving official code. Also, current compilers make such code changes unnecessary as well - a simple line a = a * 1024 will compile into SAL 10 so compiler will optimize multiplications into bitshifts when possible (unless of course the compiler cannot see when to optimize but a good programmer can).

Reply 5 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> Futher the author implemented a jumptable FPU core. Might be good.

...but it won't be any faster as the fpu operations are very
heavy themselves.

Reply 6 of 7, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Still, every bit of optimization helps as long as it doesn't adversely affect the maintainability, stability, or portability of the code.

Reply 7 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

None of those optimizations can't be done by the compiler
(msvc already uses jump tables for the fpu, i assume gcc
does that as well), except for the optimized idle looping 😉
And replacing constant calculations by precalculated values
DOES affect readability.