- Joined
- Sep 14, 2012
- Messages
- 3,413
Okay this thread is mad efficiency so if you're not on this don't say pointless optimization.
I'll show first the fact.
Outputs this
So for normal structs (outside the extends array I just want the variables), the name is like this : s__nameofstruct__nameofmember
Outputs this
So for private structs the name is like this : s__nameofscope___nameofstruct_nameofmember
Outputs this
Exactly the same as non_privated struct :O !!!!
And now for the last.
Outputs this
Exactly the same as just privated struct !
SO to sum up this :
- normal struct name : s__nameofstruct__nameofmember
- private struct name : s__nameofscope___nameofstruct_nameofmember
- normal struct private member : s__nameofstruct__nameofmember
- private struct private member : s__nameofscope___nameofstruct_nameofmember
Would this mean that using non-private struct and using everything private inside is faster ?
What do you think of it ?
I'll show first the fact.
JASS:
scope Test
struct a extends array
unit u
endstruct
endscope
JASS:
//JASSHelper struct globals:
constant integer si__a=1
unit array s__a_u
So for normal structs (outside the extends array I just want the variables), the name is like this : s__nameofstruct__nameofmember
JASS:
scope Test
private struct a extends array
unit u
endstruct
endscope
JASS:
//JASSHelper struct globals:
constant integer si__Test___a=1
unit array s__Test___a_u
So for private structs the name is like this : s__nameofscope___nameofstruct_nameofmember
JASS:
scope Test
struct a extends array
private unit u
endstruct
endscope
JASS:
//JASSHelper struct globals:
constant integer si__a=1
unit array s__a_u
Exactly the same as non_privated struct :O !!!!
And now for the last.
JASS:
scope Test
private struct a extends array
private unit u
endstruct
endscope
JASS:
//JASSHelper struct globals:
constant integer si__Test___a=1
unit array s__Test___a_u
Exactly the same as just privated struct !
SO to sum up this :
- normal struct name : s__nameofstruct__nameofmember
- private struct name : s__nameofscope___nameofstruct_nameofmember
- normal struct private member : s__nameofstruct__nameofmember
- private struct private member : s__nameofscope___nameofstruct_nameofmember
Would this mean that using non-private struct and using everything private inside is faster ?
What do you think of it ?