Talk:Word wrap: Difference between revisions

→‎REXX Timings: add explanition of time measurement
(→‎REXX Timings: added comments on REXX timings and the use of Classic REXX instead of ooRexx. -- ~~~~)
(→‎REXX Timings: add explanition of time measurement)
Line 63:
 
: 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.   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.   The REXX version 2 doesn't write it's output to the terminal.   It's hard to compare apples to oranges when one program writes to the terminal, another writes to a file.   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).   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.   Also, please note, this is the (Classic) REXX section, not ooRexx.   Also note that the task asks to wrap a paragraph of text, not a book.   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.   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.   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.   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)
 
:: Sorry, I forgot to mention that I adjusted all 3 versions so that they read the file (1 line) and create an output file (lineout instead of say). I could never display a million bytes on the screen in 10, 20 or what seconds :-) 200 paragraphs having 5000 characters each would be the same load. And I wanted to compare the algorithms' speed in some measurable way. --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 18:02, 21 August 2013 (UTC)
2,294

edits