fix benchmark

This commit is contained in:
Irmen de Jong 2024-11-01 03:46:54 +01:00
parent 4b23b1dc86
commit a2194c43a6
3 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,4 @@
%import gfx2 %import gfx_lores
%import math %import math
circles { circles {
@ -14,7 +14,7 @@ circles {
if use_kernal if use_kernal
void cx16.set_screen_mode(128) void cx16.set_screen_mode(128)
else else
gfx2.screen_mode(1) gfx_lores.graphics_mode()
math.rndseed(12345,6789) math.rndseed(12345,6789)
cbm.SETTIM(0,0,0) cbm.SETTIM(0,0,0)
@ -28,14 +28,14 @@ circles {
cx16.GRAPH_clear() cx16.GRAPH_clear()
} }
else else
gfx2.clear_screen(0) gfx_lores.clear_screen(0)
total_num_circles += draw_circles(use_kernal, max_time) total_num_circles += draw_circles(use_kernal, max_time)
} }
if use_kernal if use_kernal
void cx16.set_screen_mode(3) void cx16.set_screen_mode(3)
else { else {
gfx2.screen_mode(0) gfx_lores.text_mode()
} }
return total_num_circles return total_num_circles
@ -66,7 +66,7 @@ circles {
cx16.GRAPH_draw_oval(x-radius, y-radius, radius*2, radius*2, true) cx16.GRAPH_draw_oval(x-radius, y-radius, radius*2, radius*2, true)
} }
else else
gfx2.disc(x, y as ubyte, radius, color) gfx_lores.disc(x, y as ubyte, radius, color)
circle_x[num_circles] = x circle_x[num_circles] = x
circle_y[num_circles] = y circle_y[num_circles] = y
circle_radius[num_circles] = radius circle_radius[num_circles] = radius

View File

@ -62,7 +62,7 @@ main {
benchmark_score[benchmark_number] = adpcm.decode_benchmark(300) benchmark_score[benchmark_number] = adpcm.decode_benchmark(300)
benchmark_number++ benchmark_number++
announce_benchmark("circles with gfx2") announce_benchmark("circles with gfx_lores")
benchmark_score[benchmark_number] = circles.draw(false, 300) benchmark_score[benchmark_number] = circles.draw(false, 300)
benchmark_number++ benchmark_number++

View File

@ -1,6 +1,10 @@
TODO TODO
==== ====
remove all remaining 'gfx2' references in code and docs
benchmark program is slightly slower than before. why
paint and rockrunner are a couple of bytes bigger. why? paint and rockrunner are a couple of bytes bigger. why?
merge problem: if 2 library modules both have merge, stuff breaks (math & prog8_math where prog8_math used to have math block.... didn't work) merge problem: if 2 library modules both have merge, stuff breaks (math & prog8_math where prog8_math used to have math block.... didn't work)