https://softwareengineering.stackexchange.com/questions/3110...
> Part of what curses does is optimize cursor control sequences so (for example) to backspace all the way to the beginning of a line, instead of writing out a bunch of back-space characters, it can issue one command to move the cursor to the beginning of the line, and one more to erase to the end of the line.
For more detail, there's the source code.