Talk:Word wrap: Difference between revisions

m
→‎REXX Timings: corrected a misspelling. -- ~~~~
(→‎REXX Timings: seperated versions into different sections, added comments. -- ~~~~)
m (→‎REXX Timings: corrected a misspelling. -- ~~~~)
Line 64:
version 0 has a minor flaw: The output has a leading blank. Otherwise outputs are identical. --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 09:55, 21 August 2013 (UTC)
</strike>
::::: fixedFixed the flow(extra) leading blank. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 21:01, 21 August 2013 (UTC)
 
: Since you didn't post a version of the program (version 2) that actually reads a file, I suspect that a factor is reading the (one million bytes) text file. &nbsp; Also, console (terminal) I/O (at least on Windows/XP systems and such [using Regina]) is very unkind to timings (elapsed time), especially when causing the output to scroll. &nbsp; The REXX version 2 doesn't write it's output to the terminal. &nbsp; It's hard to compare apples to oranges when one program writes to the terminal, another writes to a file. &nbsp; I frequently time REXX programs, and timing large amounts of data being written to the screen (even as an artifact) really effects the elapsed time (which is, I suspect, what you are measuring, not CPU time). &nbsp; When displaying a million bytes of characters to a DOS window uses a fair amount of wall clock time, and the same can be said for reading a file that large. &nbsp; Also, please note, this is the (Classic) REXX section, not ooRexx. &nbsp; Also note that the task asks to wrap a paragraph of text, not a book. &nbsp; The input file (LAWS.TXT) exceeded that by a bit, but using a million bytes of text stresses the REXXes variable accessing mechanism quite a bit, and what is being measured (besides the reading and displaying) is the accessing of the text, in this case, the WORD BIF. &nbsp; If speed is what is wanted, a stemmed array could've been used instead of a flat representation (one REXX variable), but that would obfuscate somewhat the REXX program during the reading of the file. &nbsp; The idea was to show how to re-format a paragraph, and for that amount of text, it wasn't worth the added complexity to make the REXX program faster. &nbsp; One million bytes of text was a design consideration. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 15:49, 21 August 2013 (UTC)