| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | rmtrail() variants |
1237d00cd6d3 c_echo Hello Bob - BS> I inadvertently deleted some messages relating to this BS> thread - initially a discussion of ini.c from SNIPPETS. BS> All of the points in this thread have been well taken. BS> Taking the larger view, something should be obvious. One BS> hazard of a compact, terse language like C is that BS> programmers find themselves in "Name That Tune" style BS> contests for bragging rights to the tersest code. (If BS> you're too young to remember "Name That Tune", don't worry BS> about it - it was an old radio, and later TV, game show.) I vaguely remember Groucho Marx hosting a show like that and then I _think_ his announcer took it over for awhile when Groucho retired? BS> The point is that after the first few postings, most of the BS> effort went into making the code visibly smaller. The BS> difference in timing between the slowest and fastest is BS> probably inconsequential for most applications. The BS> function, trimming trailing whitespace from a string, is BS> furthermore an almost ideal example of a function that, if BS> it's too slow, should be rewritten in assembly for maximum BS> improvement. BS> Given this perspective, I'd argue that the code that is BS> most readable with the most obvious algorithm should be BS> preferred, based solely on its maintainability. Considering where we find ourselves today with processors so fast I've stopped comparing 'cycles' for ASM instructions as irrelevant for modern hardware I would have to wholeheartedly agree with your observation. On modern hardware COBOL could manage telecom apps. ;-) I have already mentioned that self-documenting code is preferable here to me when determining what code is 'best' where I have choices to make from multiple sources. I would add one other observation that error trapping gets trampled in the 'need for speed' and an archive such as snippets (particularly for embedded work) should have error-trapping as it's secondary focal point I would think? > > , , > o/ Charles.Angelich \o , > __o/ > / > USA, MI < \ __\__ ___ * ATP/16bit 2.31 * ... DOS the Ghost in the Machine! http://www.undercoverdesign.com/dosghost/ --- Maximus/2 3.01* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000) SEEN-BY: 633/267 270 @PATH: 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.