Re: Bug in ed

new topic     » goto parent     » topic index » view thread      » older message » newer message

David Cuny writes:
> You may have noticed that it's also slower than ed in
> loading files. That's because it converts tabs into spaces,
> and strips off the line feed at the end of the line.

I did a time profile on ee while it loaded a large file.
The profile indicated that printing the current number of lines
to the screen consumes about 30% of the
load time (counting all the statements involved in that process).
It's hard to measure exactly, because you have to
exit ee as soon as possible after loading the file,
which only takes a few seconds on my Pentium.

Converting the tabs and removing the \n only accounted
for 4%. ed also converts tabs (for .e and .ex files only).

int_to_bits() consumed a lot too, but I think
that's in the loop where ee waits for a key to be pressed,
so it doesn't matter.

Regards,
     Rob Craig
     Rapid Deployment Software

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu