View Full Version : arrays: many or one comprehensive one?
07-04-2003, 12:15 AM
i have a function intenise program that uses lots of data..
the data is fairly related, but since i have a lot of loops and comparisons happening is it bad to have "one giant array"
then smaller dedicated ones?
07-04-2003, 04:29 AM
Break it up if your loops will be bigger using one array. Otherwise, use whatever is easier to edit.
07-04-2003, 08:30 AM
smaller arrays usually means faster esp. if you can get rid of for loops.
I know this from my game programming.
example would be Block Gang (http://www10.brinkster.com/a1ien51/BlockGang/)
It was slow by using 2D arrays in some parts. I cut it down to 1D in some areas and it went faster. I worked with Joh6nn to optimize the array speed.
If you want to know some tricks to make 2d faster just ask.
07-05-2003, 06:27 AM
break it up like an outline or family tree
07-05-2003, 02:58 PM
If you want to know some tricks to make 2d faster just ask
I'll ask A1ien51, sounds interesting.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.