Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Some picoseconds, maybe. Neglectable.
Posts: 2,524
Threads: 109
Joined: Sep 2009
Reputation:
0
Variables are not alike strings. The computer reads them differently as you would (probably binary values or hex addresses, can't be sure now), so if you read the variable for "VariableNameHere" or "ThisVariableNameHereIsForTheNumberStorage" or "VarNameNumber", it's all for your comfort and will allow you to understand easily what your variable stores if you have too many of them, for the compiler it's just another address of data. In strings it's different too, but the difference is not noticeable for anyone, but only for the machine. Programmers I know personally (more specific game developers) tend to be descriptive with their variable names so they can identify what they store easily.
1 cell is 4 bytes, so 1 kylobites is 1024 bytes. A string of 128 cells (512 bytes) would be only 0.5 kylobites, so it's not even about speed but memory usage.
Posts: 2,524
Threads: 109
Joined: Sep 2009
Reputation:
0
That's not how you do benchmarking, one is not enough, you would have to do that thousands of times (a loop) to get reliable results.