Talk:Word wrap: Difference between revisions

→‎REXX timings: added some comments.
(→‎REXX timings: made a comment about strike-outs. -- ~~~~)
(→‎REXX timings: added some comments.)
 
(One intermediate revision by the same user not shown)
Line 206:
:: Translated version 2 to PL/I. Since PL/I has a limit of 32767 for character strings I had to cut the input into junks of 20000 bytes and add extra reads. Output is identical to REXX. --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 19:38, 21 August 2013 (UTC)
 
The last shown REXX program has a problem with classic REXX: '''fn''' is an unknown function.   Also, that REXX program only reads the first record of the file (does exactly one read) instead of doing a loop until done.   It would make more sense to exclude the time to read the file as well as bypassing the writing of the records to the file, as the I/O would be unvarying and slightly dependantdependent on other I/O activity in the system, not to mention caching.   Whoever does the first reading pays for all the I/O, the 2nd reading would be from cache.   I would benchmark for a paragraph of text as the task says, not a million bytes.   Scale up the number of executions to make the timings meaningful.   Also, I took the liberty of breaking up the listing of the REXX programs into separate sections, perhaps it would be a good idea to label/identify them, not to mention to bring version 0 and 1 up to date. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 21:01, 21 August 2013 (UTC)
 
-----
Line 248:
:: version 0 and 1 remove them and reduce multiple blanks to one blank. --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 21:59, 21 August 2013 (UTC)
 
::: What about version zero ???   REXX version 0 and 1 already removes leading and multiple imbeddedembedded blanks (as well as trailing blanks). -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 22:06, 21 August 2013 (UTC)
 
:::: that's what I tried to say. the '1' got lost.--[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 22:15, 21 August 2013 (UTC)
Line 276:
:::::* REXX version 2     1.05 seconds   (optimized by making the '''ow''' subroutine non-destructive)
:::::* REXX version 2     1.01 seconds   (optimized by making the '''ow''' subroutine in-line)
:::::* REXX version 2     0.96 seconds   (optimized the inner DO loop, eliminated an   '''if'''   statement)
The   '''lastpos'''   BIF was used to find the last blank (within a field of '''W''' characters instead of searching for the last blank character by character).
<br>Further optimization was done using &nbsp; '''parse''' &nbsp; instead of &nbsp; '''substr''' &nbsp; and other such thingys. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:39, 21 August 2013 (UTC)
Line 292:
 
:: In my IBM time I learned that American colleagues are less spelling-conscious than we Europeans (or Austrians). It's a matter of emphasis on spelling in school. Did you do quite a web check or a quiet web check --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 05:36, 23 August 2013 (UTC)
 
::: Rosetta Code isn't the place to publish such observations. &nbsp; I know a snub when I hear (or read) one. &nbsp; Best to just remove such comments, even from a discussion page. &nbsp; Even if it were true, its still not an unbiased opinion or possible not even a valid observation (too limited and narrow), and it might appear that it could be based on a limited sampling group (and by one person at that). &nbsp; Not everybody has a spell-checker available. &nbsp; Without spell-checkers, typos are more common. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 03:24, 17 August 2018 (UTC)
::: Are you sure about the &nbsp; '''lastpos''' &nbsp; BIF not being available in (your) host's version of REXX? &nbsp; It's been around in REXX at least since 1984 (according to a VM System Product Interpreter Reference Summary), long before it was ported to MVS (or whatever it's being called now). &nbsp; Which host (and release) are you using? &nbsp; I didn't post any of REXX version 2 programs since you signed your name to it, and I didn't want to publish various versions of it, as it would appear that you were the author, and it didn't seem worth all the bother to include disclaimers and whatnot, and I had so many versions. &nbsp; I was just fooling around and was squeezing blood from a turnip trying to get more performance out of the program. &nbsp; I probably could get more performance out of it, but I got tired shoveling all that coal, and I had to add more code to handle a special case of long words. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 07:28, 22 August 2013 (UTC)
 
:::: I'd suggest to leave the header intact and add change lines such as * yyyyddmm GS this and that. But I really don't care. I put my names into my programs because I like to be known. Your programs are easily recognizable by @ and $ :-) AND your unique indentation rules! --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 05:36, 23 August 2013 (UTC)
 
::::: I guess some people like to be known. &nbsp; However, Rosetta Code has a policy against vanity badges and strongly discouraged, and most have been removed. &nbsp; &nbsp; People can look at the ''history''' file and see who performed the entering of the computer program and/or the changes. &nbsp; I have learned later (after I did the tuning and timings) that timings are also discouraged, especially between languages. &nbsp; This whole discussion on the REXX timings should probably be deleted. &nbsp;
 
 
<br>Here is the latest revision &nbsp; (with not much commenting, but better than nothing):
Line 373 ⟶ 378:
 
:: Let's leave it at that. I shall be using lastpos in the future. thanks. Nevertheless version 2 seems to be undoubtedly better than !?! --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 05:40, 23 August 2013 (UTC)
 
::: I wouldn't agree that your version is &nbsp; ''undoubtedly'' &nbsp; better. &nbsp; I do have a few doubts. &nbsp; Version one version doesn't erase existing files, it also has more options (the ''kind'' of text justifications, giving the user a choice), it has as lot more documentation (comments) to explain what is happening and why, has error checking and error messages to handle bad command line options, checks for file-not-found and file-is-empty conditions, etc. &nbsp; I assume you must be using a different or unknown metric(s) for ''undoubtedly better". &nbsp; Rosetta Code is not the place to crow about one's version being better than another, '''unless''' you wrote both versions and you're pointing out the value &nbsp; (however one judges ''value'') &nbsp; of one program entry versus another. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 03:24, 17 August 2018 (UTC)