-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
performanceMust go fasterMust go fasterregression 1.11Regression in the 1.11 releaseRegression in the 1.11 release
Description
Hi,
I found Base.Process created by open(x::Cmd) is extremely slower than v1.10.4.
Minimal example in Linux:
First create a large file:
file = joinpath(Sys.BINDIR, "../include/julia/uv.h")
large_file = "z.large.file"
for i in 1:1000
run(pipeline(`cat $file`, stdout = large_file, append=true))
endThen, run the following command in Julia v1.11.1 and v1.10.4:
large_file = "z.large.file"
c = 0
io = open(`cat $large_file`)
@time while !eof(io)
line = readline(io)
c += length(line)
end
close(io)Here is the differences:
- v1.11.1:
2.123290 seconds (12.57 M allocations: 496.226 MiB, 5.34% gc time, 2.38% compilation time) - v1.10.4:
0.579683 seconds (8.07 M allocations: 440.373 MiB, 3.59% gc time, 3.00% compilation time)
I also wrote a package to solve the regression, which is BiBufferedStreams.jl
Its readme has a thorough benchmark, eliminating the effects of precompilation.
Metadata
Metadata
Assignees
Labels
performanceMust go fasterMust go fasterregression 1.11Regression in the 1.11 releaseRegression in the 1.11 release