←  Programs

ComputerCraft | Programmable Computers for Minecraft

»

Terminal Benchmark 1.0 - Term API performa...

CrazedProgrammer's Photo CrazedProgrammer 20 Feb 2016

Does your graphically intensive program suffer from lag?
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:
Posted Image
Command computer native terminal:
Posted Image
8x6 color monitor:
Posted Image

Share your scores!
Edited by CrazedProgrammer, 15 July 2016 - 11:14 PM.
Quote

Pyuu's Photo Pyuu 20 Feb 2016

Wouldn't this program be very dependent on what Minecraft is doing in the background?
Quote

Creator's Photo Creator 20 Feb 2016

There is a similar program hiding on the forums. Something with benchmark.
Quote

Pyuu's Photo Pyuu 21 Feb 2016

Even if this program is similar, it's still an interesting utility.
Quote

HPWebcamAble's Photo HPWebcamAble 21 Feb 2016

View PostMayushii, on 20 February 2016 - 11:25 PM, said:

Wouldn't this program be very dependent on what Minecraft is doing in the background?

I doubt it. But you can always try running it a few times.
Quote

Bomb Bloke's Photo Bomb Bloke 21 Feb 2016

A suggestion, perhaps check if the current terminal has a setVisible() function (eg "if term.current().setVisible then"), and if so, perform tests for both states (or maybe just ask which state to use)?
Quote

CrazedProgrammer's Photo CrazedProgrammer 21 Feb 2016

View PostBomb Bloke, on 21 February 2016 - 12:16 PM, said:

A suggestion, perhaps check if the current terminal has a setVisible() function (eg "if term.current().setVisible then"), and if so, perform tests for both states (or maybe just ask which state to use)?
Good suggestion!
That's interesting since it won't draw to the parent terminal/window.
I'll add it in version 1.1 with
tbm i
Also, I should fix the term.write and term.blit benchmarks because they don't restore to location (1,1) so they draw outside of the screen :P
I'm going on vacation for 5 days so it'll be around a week until I release version 1.1.

Also, post your benchmarks people!
(I want to feel special with my 3 year old i5 3570K OC 4.2GHz :P)
(I know I suck at life)
Edited by CrazedProgrammer, 21 February 2016 - 03:57 PM.
Quote

Waitdev_'s Photo Waitdev_ 22 Feb 2016

can you add a line to show the total of all of them? also, awesome program idea :3
Quote

CrazedProgrammer's Photo CrazedProgrammer 22 Feb 2016

View PostWaitdev_, on 22 February 2016 - 08:06 AM, said:

can you add a line to show the total of all of them? also, awesome program idea :3
Thanks!
Would it be better to have a "benchmark score" instead of the sum of all functions?
Quote

Waitdev_'s Photo Waitdev_ 22 Feb 2016

View PostCrazedProgrammer, on 22 February 2016 - 09:32 AM, said:

View PostWaitdev_, on 22 February 2016 - 08:06 AM, said:

can you add a line to show the total of all of them? also, awesome program idea :3
Thanks!
Would it be better to have a "benchmark score" instead of the sum of all functions?
yeah, that would be nice :)

also, in the "k" part, is higher better?
Edited by Waitdev_, 22 February 2016 - 09:42 AM.
Quote

CrazedProgrammer's Photo CrazedProgrammer 22 Feb 2016

View PostWaitdev_, on 22 February 2016 - 09:36 AM, said:

View PostCrazedProgrammer, on 22 February 2016 - 09:32 AM, said:

View PostWaitdev_, on 22 February 2016 - 08:06 AM, said:

can you add a line to show the total of all of them? also, awesome program idea :3
Thanks!
Would it be better to have a "benchmark score" instead of the sum of all functions?
yeah, that would be nice :)

also, in the "k" part, is higher better?
Yes.
"k" means thousand.
Quote

funniray10's Photo funniray10 24 Feb 2016

could you make this like test how fast it can run funtions in your program, like fun api.writeAll("text") or something like that?
Quote