Skip to content

Commit e286824

Browse files
committed
GenSym is slightly cheaper than gensym in terms of the code generated
this might make tests a wee bit faster ref #15346
1 parent 5d5c484 commit e286824

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/test.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ macro test(ex)
160160
if isa(ex, Expr) && ex.head == :comparison
161161
# Generate a temporary for every term in the expression
162162
n = length(ex.args)
163-
terms = [gensym() for i in 1:n]
163+
terms = [GenSym(i) for i in 1:n]
164164
# Create a new block that evaluates each term in the
165165
# comparison indivudally
166166
comp_block = Expr(:block)

0 commit comments

Comments
 (0)