Skip to content

Commit

Permalink
GenSym is slightly cheaper than gensym in terms of the code generated
Browse files Browse the repository at this point in the history
this might make tests a wee bit faster

ref #15346
  • Loading branch information
vtjnash committed Apr 6, 2016
1 parent fe25107 commit 68ad5d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ macro test(ex)
if isa(ex, Expr) && ex.head == :comparison
# Generate a temporary for every term in the expression
n = length(ex.args)
terms = [gensym() for i in 1:n]
terms = [GenSym(i) for i in 1:n]
# Create a new block that evaluates each term in the
# comparison indivudally
comp_block = Expr(:block)
Expand Down

0 comments on commit 68ad5d1

Please sign in to comment.