On 2015-01-06 17:32, Mary Ann Horton<mah(a)mhorton.net> wrote:
On 01/06/2015 04:22 AM,arnold(a)skeeve.com wrote:
> >>Peter Jeremy scripsit:
>> >>>But you pay for the size of $TERMCAP in every process you run.
>John Cowan<cowan(a)mercury.ccil.org> wrote:
> >>A single termcap line doesn't cost that much, less than a KB in most
cases.
>In 1981 terms, this has more weight. On a non-split I/D PDP-11 you only
>have 32KB to start with. (The discussion a few weeks ago about cutting
>yacc down to size comes to mind...)
>
>On a Vax with 2 Meg of memory, 512 bytes is a whole page, and it might
>even be paged out, and BSD on the vax didn't have copy-on-write.
>
>ISTR that the /etc/termcap file had a comment saying something like
>"you should move the entries needed at your site to the top of this file."
>Or am I imagining it?:-)
>
>In short - today, sure, no problem - back then, carrying around a large
>environment made more of a difference.
>
>Thanks,
>
>Arnold
Even with TERMCAP in the environment, there's still that
quadratic
algorithm every time vi starts up.
I must be stupid or something. What quadratic algorithm?
vi gets the "correct" terminal database entry directly from the
environment. Admittedly, getting any variable out of the environment
means a linear search of the environment, but that's about it.
What am I missing? And once you have that, any operation still means
either searching through the terminal definition for the right function,
which in itself is also linear, unless you hash that up in your program.
But I fail to see where the quadratic behavior comes in.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol