Re: not sure where to post this question... bit C++ implementation specific....
Noel Llopis <[email protected]>
| Newsgroups | gmane.games.devel.general |
|---|---|
| Message-ID | <[email protected]> |
On Wednesday 07 July 2004 07:05 am, Richard Fabian wrote: > its actually more of a "didn't want to have to dereference everytime i > needed to access the array". speed issue... You do realize that, at least on a PC, it's just as fast accessing an array on the stack than one that was dynamically allocated, right? Actually, if you're accessing more than one int at the time, the dynamically-allocated one might be faster because of better memory alignment. And if you're talking about the extra indirection added by boost::scoped_array... I admit I haven't measured, but I doubt very, very much you would notice any difference unless all your program did was run in a for loop accessing array elements. > The best fix in our situation will be to use defines as far as i can > see. Personally, I see nothing wrong with simple defines for things like that. It's when you start doing complicated macros that the pre-processor can become more of a problem than it solves. --Noel Games from Within http://www.gamesfromwithin.com ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Gamedevlists-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=557