pointer arithmetic vs. arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey everyone. I've heard (and have also read in "The C Programming Language") that pointer arithmetic in place of arrays is, in general, faster. However, I've also heard that modern compilers automatically make optimizations that account for this difference.

In everyone's opinion, taking both readability and issues of speed into account, what is better to use? I'd imagine this would depend on the situation. Just trying to pick up better coding habits as I learn :)

James

--
My blog: http://www.crazydrclaw.com/
My homepage: http://james.colannino.org/

"If Carpenters made houses the way programmers design programs, the first woodpecker to come along would destroy all of civilization." --Computer Proverb

-
: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux