-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
following development of JuliaLang/julia#47184, it seems that this package would benefit from including realistic composite workload.
For example, consider this slow TTFP:
julia> using PrettyTables
julia> @time @eval pretty_table(devnull, Dict(:a=>rand(10), :b=>rand(Float32, 10)))
0.778972 seconds (1.74 M allocations: 114.494 MiB, 7.43% gc time, 141.16% compilation time)if we make the following change:
diff --git a/src/PrettyTables.jl b/src/PrettyTables.jl
index a39444d..5fb57d7 100644
--- a/src/PrettyTables.jl
+++ b/src/PrettyTables.jl
@@ -103,6 +103,7 @@ if Base.VERSION >= v"1.4.2" && !haskey(ENV, "PRETTY_TABLES_NO_PRECOMPILATION")
_precompile_()
catch
end
+ pretty_table(devnull, Dict(:a=>rand(UInt8, 10), :b=>rand(Float64, 10)))
end
end # modulewe get:
julia> using PrettyTables
julia> @time @eval pretty_table(devnull, Dict(:a=>rand(10), :b=>rand(Float32, 10)))
0.468314 seconds (929.76 k allocations: 59.503 MiB, 10.62% gc time, 141.03% compilation time)Notice we use different types here to show the precompiled stuff is transferable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request