carlobaldassi / ArgParse.jl

Package for parsing command-line arguments to Julia programs.
Other
236 stars 36 forks source link

reduce inference and optimization time (by turning it off) #104

Closed KristofferC closed 3 years ago

KristofferC commented 3 years ago

Benchmarking the script in https://carlobaldassi.github.io/ArgParse.jl/stable/#Quick-overview-and-a-simple-example-1:

Master

❯ hyperfine --warmup=1 'julia --project script.jl foo'
Benchmark #1: julia --project script.jl foo
  Time (mean ± σ):      3.166 s ±  0.064 s    [User: 3.386 s, System: 0.287 s]
  Range (min … max):    3.075 s …  3.238 s    10 runs

PR:

❯ hyperfine --warmup=1 'julia --project script.jl foo'
Benchmark #1: julia --project script.jl foo
  Time (mean ± σ):      1.271 s ±  0.016 s    [User: 1.524 s, System: 0.264 s]
  Range (min … max):    1.253 s …  1.294 s    10 runs
carlobaldassi commented 3 years ago

:+1: thanks

KristofferC commented 3 years ago

Would be nice with a new release whenever is suitable.

oscardssmith commented 3 years ago

Is there any other low hanging fruit for speeding this up (better precompile or something?)

KristofferC commented 3 years ago

You could experiment with SnoopCompile.jl.

carlobaldassi commented 3 years ago

It's released now.