On Wed, 2006-05-10 at 13:58 +0200, Matthias Langer wrote:
> On Wed, 2006-05-10 at 07:51 +0200, Nagatoro wrote:
> [snip]
> > Least:
> > ... Gnome-terminal, slow, and in my opinion horrible color support.
> [snip]
> 
> Gnome terminal used to be slow, but vte (the underlying library) has
> beem optimized heavily during the last few month. I've a simple program
> that measures the speed of terminals. According to this program
> gnome-terminal is now __50__ times faster than it was 5 month ago.
> 
> Matthias

Well, here are some comparisons done with my test-prog (attached)
(higher is better):

eterm:                  ~ 14 000 l/s
xterm:                  ~  8 500 l/s
gnome-terminal:         ~  3 500 l/s
frame-buffer:           ~     40 l/s

Btw: I should have written __80__ instead of __50__.

PS: Please note that the attached program is an ad hoc implementation to
do some basic comparisons, and not a sophisticated program. Compile it
with 'g++ -Wall -O3 <filename.cc> -o <executable>'.



#include <ctime>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

static string 
rStr("AaBbCcEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz(){}[]?*+-/_-:.;,                                       ");

int main(int argc, char **argv)
{
	int lines;
	if(argc == 1)
		lines = 20000;
	else if(argc == 2)
	{
		lines = atoi(argv[1]);
		if(lines < 1000)
		{
			cerr << "Please enter at least '1000' for lines !" << endl;
			return 1;
		}
	}
	else
	{
		cerr << "Usage: tspeed <lines>" << endl;
		return 2;
	}
	time_t t1 = time(NULL);
	for(int i=0; i != lines; ++i)
	{
		cout << rStr << endl;
		random_shuffle(rStr.begin(), rStr.end());
	}
	time_t t2 = time(NULL);
	time_t elapsed = t2-t1;
	if(elapsed == 0)
	{
		cerr << "Writing " << lines << " lines to the screen took less than one second." << endl;
		cerr << "Please choose a bigger value for lines." << endl;
		return 3;
	}
	double speed = double(lines)/double(elapsed);
	cerr << endl;
	cerr << "terminal speed: " << speed << " l/s" << endl;
	return 0;
}
	

Reply via email to