[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimise line splitting in shell



I've added a line to init.el to byte-compile everything in personal/,
which has sped up the line-splitting so that it now only takes about a
third as long as the xterm-color code (~20% CPU and ~60% CPU).

It's still a memory hog, but I'm not sure how easy that would be to fix.
Maybe we could prevent string copying by using integer offsets rather
than substrings; for example, noting the positions that need a newline
inserting, then allocating a string of length input+number of positions,
then mutate that string in-place to set its contents?