Lies, Damned Lies and Benchmarks.
Forum rules
Be nice. No drama.
Be nice. No drama.
Re: Lies, Damned Lies and Benchmarks.
Nice! Where do I read about Mode 1975?
Re: Lies, Damned Lies and Benchmarks.
Search for 1975 in https://github.com/kervinck/gigatron-ro ... ctions.txt
And:
Line 3149: https://github.com/kervinck/gigatron-ro ... dev.asm.py
Code: Select all
xora((1975>>8)^(1975&255)) #26 Poor man\'s 1975 detection
bne(pc()+3) #27
bra(pc()+3) #28
assert videoZ == 0x0100
st([vReturn]) #29 DISABLE video/audio/serial/etc
P.S. There are no sync signals in this mode, so your monitor loses sync until you pass -1 back to sys_SetMode.
Re: Lies, Damned Lies and Benchmarks.
Like in the OpenGL programming. You first calculate graphics in a frame and only after that you draw the frame.
Re: Lies, Damned Lies and Benchmarks.
This 1975 mode could make Mandelbrot faster. New Mandelbrot draws in 1min 17sek in fast screen mode.
Re: Lies, Damned Lies and Benchmarks.
I tested sieve 0, 1 and 2 C-programs in two screen modes. First was the videotop_v5 mode and second was zombie mode. I timed it with separate clock.
It might take time monitor to get picture after zombie mode.
sieve0 22,26sec 18,55sec
sieve1 21,22sec 17,07sec
sieve2 16,12sec 13,62sec
reference time with Z80 was 14,0sec.
It might take time monitor to get picture after zombie mode.
sieve0 22,26sec 18,55sec
sieve1 21,22sec 17,07sec
sieve2 16,12sec 13,62sec
reference time with Z80 was 14,0sec.
Re: Lies, Damned Lies and Benchmarks.
Good point. Watching the leds I counted:
sieve0 22,26sec 16,05sec -> 1,146 ratio
sieve1 21,22sec 14,55sec -> 1,039 ratio
sieve2 16,12sec 11,13sec -> 0,795 ratio
sieve0 22,26sec 16,05sec -> 1,146 ratio
sieve1 21,22sec 14,55sec -> 1,039 ratio
sieve2 16,12sec 11,13sec -> 0,795 ratio
Re: Lies, Damned Lies and Benchmarks.
The latest version of GLCC (my repo) has the standard function clock() that makes it far easier to time the code.
In fact there are several functions. The standard function clock(void) defined in <time.h> returns a clock_t which is a long. The returned value has 24 bits which wraps around after about three days. To avoid the overhead of long ints, one can use instead the function _clock(void) defined in <gigatron/libc.h> which returns an unsigned integer but wraps around after about 20 minutes. There is also a function _wait(n) that waits for n frames and returns a bit before the beginning of the vertical blank.
Anyway, timing sieve looks like:
Of course none of this works in Zombie mode.
In fact there are several functions. The standard function clock(void) defined in <time.h> returns a clock_t which is a long. The returned value has 24 bits which wraps around after about three days. To avoid the overhead of long ints, one can use instead the function _clock(void) defined in <gigatron/libc.h> which returns an unsigned integer but wraps around after about 20 minutes. There is also a function _wait(n) that waits for n frames and returns a bit before the beginning of the vertical blank.
Anyway, timing sieve looks like:
Code: Select all
unsigned int ticks = _clock();
// ...compute...
ticks = _clock() - ticks;
printf("\n%d %d/60 seconds", ticks/60, ticks % 60);