Re: Looking for ANSI/VT100 code replacement.
From: Dan Nelson (dnelson_at_allantgroup.com)
Date: 05/21/05
- Previous message: Don Lewis: "Re: problems with new the "contigmalloc" routine"
- In reply to: alexander: "Looking for ANSI/VT100 code replacement."
- Next in thread: alexander: "Re: Looking for ANSI/VT100 code replacement."
- Reply: alexander: "Re: Looking for ANSI/VT100 code replacement."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 20 May 2005 18:08:45 -0500 To: alexander <arundel@h3c.de>
In the last episode (May 21), alexander said:
> I'd like to port an application that was written in x86 assembly for
> Linux. So far all I had to do is change the Linux calling convention
> (registers) to Posix style (stack).
>
> However at one point this application outputs 5 characters to stdout
> (using syscall write and fd=1). These 5 characters however are then
> being deleted and overwritten again. The application uses VT100 codes
> to do this.
>
> First it moves the cursor to the left 5 times then it deletes
> everything from the end of the line to the current cursor position.
>
> However this slows down the whole application. That's why I'd like to
> replace that code with something faster.
How often are you doing this? I wrote a quick microbenchmark and my
pIII-900 box can do 80000 writes() per second of "\e[5D\e[Kabcde". I
don't think that's your bottleneck. If it is, the usual solution is to
not do a write on every iteration. You've got a (maximum) 100hz screen
refresh rate anyhow, so doing more than 100 updates per second won't do
you any good. Even 10 is probably more than you need.
-- Dan Nelson dnelson@allantgroup.com _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Don Lewis: "Re: problems with new the "contigmalloc" routine"
- In reply to: alexander: "Looking for ANSI/VT100 code replacement."
- Next in thread: alexander: "Re: Looking for ANSI/VT100 code replacement."
- Reply: alexander: "Re: Looking for ANSI/VT100 code replacement."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|