Posts: 913
Threads: 70
Joined: Apr 2009
Reputation:
0
I've readed lot of about this, and I saw someone said arrays are slower than normal single variables, someone not.
What's your opinion?
Posts: 654
Threads: 20
Joined: Jul 2009
Reputation:
0
What you're suggesting cannot be justified without any relevant theory to back it up. You need to elaborate.
Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
Id rather say, arrays are only slower than single variables, if you misuse them. E.g. by making them bigger than needed.
Technically, arrays are nothing else but normal variables, pointers to a position in memory. Arrays just got an additinal rule that defines the offset from the position for array indexes. Reading and writing to these memory addresses always have the same speed.
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
I'm going to agree with Mauzen on this one!