RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
|
| 12 Jul 2011 03:26 PM |
I know this probably doesn't matter but...
Which is faster/more efficient(in theory), referring to a brick by its full name, or to a variable attached to it?
print(workspace.Brick)-----------This?
or
local a = workspace.Brick
print(a)---------------------------Or this?
--Probably very complicated and very simple to answer O.o paradox |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 12 Jul 2011 03:30 PM |
| The first one is less letters, but if you were referring to it multiple times, then creating a variable could be less letters. |
|
|
| Report Abuse |
|
|
RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
|
| 12 Jul 2011 03:34 PM |
| I don't think less letters or not matters. It's the action the computer does that matters. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2011 03:35 PM |
Since you create a variable to reference the namespace for the object, I'd assume the variable is less efficient for the computer. But WE are humans. We love shortcuts. :3
~~~ AFF ~~~ |
|
|
| Report Abuse |
|
|
RawrBot
|
  |
| Joined: 22 Aug 2008 |
| Total Posts: 832 |
|
|
| 12 Jul 2011 03:38 PM |
| @Agent I was thinking the same thing. I agree we love shortcuts xD you gave the perfect answer, thanks man. |
|
|
| Report Abuse |
|
|