well put, chris. I think a few people on this list have a pointerfobia. And then again, there's always the "It's modern technology. What should it matter if it takes 5 cycles or 500, they are faster than they used to be. I'd hate to see coding 10 years down the road.
Thanks, Tyler Littlefield Web: tysdomain.com email: [email protected] My programs don't have bugs, they're called randomly added features. ----- Original Message ----- From: Christopher Coale To: [email protected] Sent: Tuesday, April 21, 2009 1:56 PM Subject: Re: [c-prog] vector of pointer Paul Herring wrote: > > > On Tue, Apr 21, 2009 at 1:01 AM, Christopher Coale > <[email protected] <mailto:chris95219%40gmail.com>> wrote: > > God gave us pointers (and C++ gave us "new" and > > "delete") for a reason - let's use them. :) > > And the compiler developers gave us profiling tools - perhaps we > should be using them first rather than resorting to premature > optimisation and guestimating? > > And, incidentally, if you're considering using pointers, I do hope > you're planning on using the pointer wrappers, not the raw pointers > themselves, and not abandoning them in favour of more premature > optimisation. > > -- > PJH > > http://shabbleland.myminicity.com/ind > <http://shabbleland.myminicity.com/ind> > http://www.chavgangs.com/register.php?referer=9375 > <http://www.chavgangs.com/register.php?referer=9375> > > Its more of a common-sense thing than premature optimization. In fact, it isn't even exactly an optimization, its more of doing what should be done in the first place. And common sense should tell you that 64 cycles is slower than 1 cycle - where is the need for profiling tools? Sending a pointer down the bus (whether it is a 32 or 64-bit bus) is much faster (only takes 1 cycle) than sending 256 bytes of data down the bus. So, where exactly is this "guestimate" you are talking about? You are acting like pointers are the spawn of Satan, that should only be used in case of an emergency. I understand they are a tad more difficult to work with (because of management), but that is just absolute nonsense. [Non-text portions of this message have been removed]
