MilesCranmer commited on
Commit
0f6ed91
·
1 Parent(s): d5ec823

Compile julia in fastmath mode

Browse files
Files changed (2) hide show
  1. julia/sr.jl +1 -1
  2. pysr/sr.py +1 -0
julia/sr.jl CHANGED
@@ -247,7 +247,7 @@ function evalTreeArray(tree::Node)::Array{Float32, 1}
247
  elseif tree.degree == 1
248
  return unaops[tree.op].(evalTreeArray(tree.l))
249
  else
250
- return @fastmath binops[tree.op].(evalTreeArray(tree.l), evalTreeArray(tree.r))
251
  end
252
  end
253
 
 
247
  elseif tree.degree == 1
248
  return unaops[tree.op].(evalTreeArray(tree.l))
249
  else
250
+ return binops[tree.op].(evalTreeArray(tree.l), evalTreeArray(tree.r))
251
  end
252
  end
253
 
pysr/sr.py CHANGED
@@ -253,6 +253,7 @@ const weights = convert(Array{Float32, 1}, """f"{weight_str})"
253
 
254
  command = [
255
  f'julia -O{julia_optimization:d}',
 
256
  f'-p {procs}',
257
  f'/tmp/.runfile_{rand_string}.jl',
258
  ]
 
253
 
254
  command = [
255
  f'julia -O{julia_optimization:d}',
256
+ f'--math-mode=fast',
257
  f'-p {procs}',
258
  f'/tmp/.runfile_{rand_string}.jl',
259
  ]