benchmark.py

Created by elnix91

Created on April 20, 2025

719 Bytes

This is a benchmark for the graphics using Kandinsky. For having tested on different models those are the average scores: N100 : <7 N100 Upsilon : >7 N110 : Na N115 : 30 N120 : >30 I will surely upgrade this later, so the scores may change. I plan testing the printing power, the turtle and the capacity to run loops. Don’t hesitate to tell me if you find any bug on discord or by mail: @elnix91 elnix91@gmail.com


from math import *
from time import *
from kandinsky import set_pixel as pix,draw_string as txt,fill_rect as rect
from math import *

def c(x,y,r,c):
  for i in range(90):
    ri=radians(i)
    xs,ys=round(r*cos(ri)),round(r*sin(ri))
    pix(x+xs,y+ys,c)
    pix(x+xs,y-ys,c)
    pix(x-xs,y+ys,c)
    pix(x-xs,y-ys,c)

txt("Calcul en cours...",70,102,(0,0,255))
t=monotonic()
#print(t)

for x in range(320):
 for y in range(222):
    pix(x,y,(0,255*x/320,0))

for j in range(25):
  rect(0,0,320,222,(255,)*3)
  for i in range(200):
    c(160,111,i,(255,0,j*10))
    


#def calc():
#  t1=6494**9999*5

t2=monotonic()
#print(t2)
tf=(t2-t)
txt("[OK]",140,102,(255,0,0),(0,0,0))
print("POWER:",1/tf*1000)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.