Raised This Month: $ Target: $400
 0% 

Are multi-dimentional arrays faster?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Vet
Veteran Member
Join Date: Jul 2006
Location: I|O wa
Old 02-16-2009 , 23:55   Are multi-dimentional arrays faster?
Reply With Quote #1

Is it faster to have a sinlge multi-dimentional array, or several single dimention arrays?
In other words, is this...
Code:
 
new data[33][3]
data[1][2] = data[1][0] + data[1][1]
faster than...
Code:
 
new data0[33]
new data1[33]
new data2[33]
data2[1] = data0[1] + data1[1]
I have a plugin that needs to access several values stored in an array. Since this is in the player_think routine, I'd like to make it as fast as possible to prevent the possibility of lag.
__________________
=====================================
- My Plugins -
=====================================
Vet is offline
Send a message via MSN to Vet
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode