2 ms·
I'm not sure about SILE, but for TeX, the algorithm determining the line breaks was exponential in the length of the document. Even on a modern machine, a moder
by cbhl 12y ago
I'm not sure about SILE, but for TeX, the algorithm determining the line breaks was exponential in the length of the document. Even on a modern machine, a moderately complex document will take a few seconds to run; in the 80s and 90s, my professors told me it'd take minutes to run a TeX pass.
The reason why Google Docs / Word / etc. can show the line breaks in real time is that it uses a faster (but less "optimal") algorithm.
- alok-g 12y agoGreat, this is the type of answer I was looking for. Can you supply or point to more details please? E.g. what is the optimal line-breaks algorithm used for Tex, and what and how much is the negative impact of the less optimal one? Thanks
- cbhl 12y agoI'd start by reading through the links on Wikipedia: http://en.wikipedia.org/wiki/Word_wrap#Knuth.27s_algorithm http://en.wikipedia.org/wiki/Word_wrap#Knuth.27s_algorithm