Talk:Word wrap: Difference between revisions

→‎REXX timings: Timings on my laptop
(→‎REXX timings: response, Murphy's musings. -- ~~~~)
(→‎REXX timings: Timings on my laptop)
Line 334:
 
:: As mentioned earlier, it was bigger than a paragraph; I hated to cut it down (as the file above).   I was using a 100x200 character wide console window and I needed something with some heft to it.   Plus, with almost all of us (readers of Rosetta Code) being computer programmers of one sort or another, I thought a by-product would be some people perusing the text and reflecting on the wisdom of the laws ... if not only in a Murphy's Law sort of way. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 07:58, 22 August 2013 (UTC)
 
My results from testing your program:
<pre>
with i=lastpos(' ',x,w+1) /*look for blank <W.*/
rexx gs text.txt 72 1000000 -> 7.09 seconds for 1000000 times.
 
with Do i=w+1 to 1 by -1
If substr(x,i,1)=' ' Then Leave
End
rexx gs2 text.txt 72 1000000 -> 10.88 seconds for 1000000 times.
</pre>
Unfortunately I cannot verify a similar performance difference with my 1MB file. --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 19:58, 22 August 2013 (UTC)
2,289

edits