Quote:
Originally Posted by knc1
Which is quoting from the eighth re-printing of a 1953 book.
Even **if** that 2004 course mentions GCC as a specific example, GCC has change a lot in the past 8 years and many of the things no longer apply, or apply only to MIPS in-house compiler.
Why even bother?
...
Any computer program parser (other than a person) is very, very good at tossing out whitespace and comments. Those are only included when trying to communicate among people. Which you clearly demonstrate is not the intent of your publications.
|
The course that you say is from 2004 contains updates that are only two weeks old. Also, the archive.org "Wayback Machine" has archives of that website from 2000 through 2008, which do NOT contain that course, so it was not added until after archive.org stopped archiving that site in 2009. It appears that you may be wrong about your "2004" date.
What "1953 book" are you referring to? That course is all about writing efficient C programs for ARM processors like we have in our kindles. The C language was developed in the early 1970's and the first ARM processor was developed in the mid 1980's.
Where did you get these 1953 and 2004 dates that seem to be irrelevant to the content of the links that I provided?
"
Why bother?" The whole point of that tutorial is that you need to look at the assembler output of the compiler to see how well it conforms to the ARM architecture
, and adjust your C code to generate efficient compiled code. Most of the GCC optimizations are x86-specific, and it is only RECENT versions of the GCC tools that do somewhat better with ARM instructions
(especially with the FREE barrel shifting built into most instructions, and the ability to mix Thumb with full ARM instructions). Unfortunately, when working on kernel and driver stuff, you really need older cross tools that match your target system such as the K3 (or you have extra work finessing the headers and libraries)
, which means recent optimization improvements will be MISSING, requiring manual C code optimization as shown in that tutorial. It is a good read and worth learning anyway, just for its own sake. Learning is good for the brain.
Regarding coding style,
I code for my OWN pleasure and my own benefit, which requires being able to view more code with less scrolling. I just choose to SHARE my code with others. As I said before, it is VERY easy to feed my "condensed" code into AStyle to convert it to WHATEVER your favorite style happens to be before reading it. AStyle is very good at ADDING all that whitespace that YOU need to be happy (but you may also want all my variable names replaced with camelCase phrases, and three lines of comments for every line of code too, before MY code has any chance of making YOU happy).
Meh...
There is certainly no need for you to get so upset every time I share some of my own personal code with the MobileRead crowd. I do not plan to change how I write my code, and I do not plan to stop sharing my source code with the world just to make you happy.
Like I said before in response to your previous harsh criticisms of my coding style, just for a point of reference, where is YOUR original source code that you must be so proud of?