Do unused variables and sigle underscore variables consume less memory than ordinary variables?
Posted: 14 Feb 2015 12:45
Let me ask something else about the code block in my previous post.
Variant#1.
RangeList is used later.
Variant#2.
_RangeList is an unused variable.
Variant#3.
The list-type result of the [||] block is passed to the unnamed and unused variable.
Will this variant consume less memory than the others?
Variant#1.
Code: Select all
clauses
iniHiLo(Range_List) :-
Range_List =
[ Range ||
Axis in applied_view:all_
applied_view:range_map_fact:tryGet(Axis):view:g(Axis,Verb,R1,R2)
].
Variant#2.
Code: Select all
clauses
iniHiLo() :-
_Range_List =
[ Range ||
Axis in applied_view:all_axes,
applied_view:range_map_fact:tryGet(Axis):view:g(Axis,Verb,R1,R2)
].
Variant#3.
Code: Select all
clauses
iniHiLo() :-
_ =
[ Range ||
Axis in applied_view:all_axes,
applied_view:range_map_fact:tryGet(Axis):view:g(Axis,Verb,R1,R2)
].
Will this variant consume less memory than the others?