-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
latencyLatencyLatencyregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version
Milestone
Description
Julia 1.2:
➜ ~ time julia -e ''
julia -e '' 0.22s user 0.10s system 110% cpu 0.287 total
Julia 1.1:
➜ ~ time julia11 -e ''
julia11 -e '' 0.15s user 0.09s system 105% cpu 0.236 total
With the following diff
diff --git a/stdlib/REPL/src/LineEdit.jl b/stdlib/REPL/src/LineEdit.jl
index 0a71488859..3d834d653e 100644
--- a/stdlib/REPL/src/LineEdit.jl
+++ b/stdlib/REPL/src/LineEdit.jl
@@ -1239,6 +1239,9 @@ function write_prompt(terminal, p::Prompt)
width = write_prompt(terminal, p.prompt)
write(terminal, Base.text_colors[:normal])
write(terminal, suffix)
+ if !REPL.Terminals.is_precompiling[]
+ exit(0)
+ end
return width
end
I measured the time to get to the prompt on 1.1 vs 1.2:
Julia 1.2:
➜ julia git:(release-1.2) ✗ time ./julia -q
./julia -q 1.25s user 0.21s system 132% cpu 1.104 total
Julia 1.1:
➜ julia11 git:(release-1.1) ✗ time ./julia -q
./julia -q 0.65s user 0.19s system 176% cpu 0.476 total
So we lost about 0.6s in time to prompt.
Running 1.2 with --trace-compile
I see the following which is not there on 1.1
precompile(Tuple{typeof(Base.copy), Array{UInt8, 1}})
precompile(Tuple{typeof(Base.similar), Array{Base.Grisu.Bignums.Bignum, 1}})
precompile(Tuple{typeof(Base.length), Array{Base.Grisu.Bignums.Bignum, 1}})
precompile(Tuple{typeof(Base.deepcopy_internal), Array{UInt32, 1}, Base.IdDict{Any, Any}})
precompile(Tuple{typeof(Base.copy), Array{UInt32, 1}})
This should only affect the time to reach the banner though. Not sure what is making the prompt be so much slower.
Metadata
Metadata
Assignees
Labels
latencyLatencyLatencyregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version