If your program suffers from lag, you might be calling the Term API functions too many times.
This program will test how long the most important Term API functions take to complete their task.
It will repeatedly run the functions for 5 seconds in steps of 1000 and calculate
the amount of microseconds it takes for a single function to complete.
If you want your program to run at a locked 20fps, it should take way less than 50000µs per frame to draw the program.
This can also be used as a benchmark for how well your computer handles ComputerCraft.
This program is compatible with all screens (black and white supported).
The minimal suggested resolution is 51x12, otherwise the text might cut off.
Download:
pastebin get 97H5d5hZ tbm
Run it with:
tbm
If you want to use term.native():
tbm n
If you want to use it on a monitor:(Replace <side> with "left", "right", "top", "bottom", "front" or "back")
monitor <side> tbm
"term.write 1" means term.write with one character.
"term.write 50" means term.write with 50 characters.
Screenshots / my results:
Command computer terminal:
Command computer native terminal:
8x6 color monitor:
Share your scores!