whats fastest

Just starting out? Need help? Post your questions and find answers here.
RedmoonX
User
User
Posts: 26
Joined: Mon Jan 17, 2005 9:54 am
Location: Sweden
Contact:

whats fastest

Post by RedmoonX »

whats fastest for having lots of instances on screen

using:
structures with arrays ex.

structure Instance
x.f[1000000]
y.f[1000000]
image.f[1000000]
endstructure

or using:

elements
like resetelements
addelements

:D

i would really need to know
^^
-
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

do you mean arrays vs. linked lists, or did i get the question all wrong?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

The answer depends on what you are trying to achieve ;) Tell more about it.
<°)))o><²³
RedmoonX
User
User
Posts: 26
Joined: Mon Jan 17, 2005 9:54 am
Location: Sweden
Contact:

Post by RedmoonX »

its about making a game with many instances.. and i saw in the demo that follows that they using ELEMENTS to keep track of all instances and move them and draw them

but is it faster then having all of them being sorted in arrays

like structure arrays
^^
-
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Linked lists are slower than simple arrays, but are much more easy to use.

In a game there are many elements that have to be created/destroyed continuosly, so using linked lists helps a lot.
Post Reply