Skip to content

Conversation

@JeffBezanson
Copy link
Member

Time for display(plot(rand(10))) on Plots master, baseline:

 25.938760 seconds (18.25 M allocations: 899.022 MiB, 1.74% gc time)

On this branch, adding Base.@optlevel 0 to Plots.jl:

 20.341163 seconds (18.26 M allocations: 899.217 MiB, 2.30% gc time)

@JeffBezanson JeffBezanson added compiler:codegen Generation of LLVM IR and native code latency Latency labels Feb 26, 2020
@vtjnash
Copy link
Member

vtjnash commented Feb 27, 2020

It might be better to map this directly to LLVM's optnone function attribute on the containing function itself, so that we don't have to inject the extra global state into the JIT. But otherwise, that's an impressive speedup!

@JeffBezanson JeffBezanson changed the title WIP: add per-module optimization level add per-module optimization level Apr 2, 2020
@JeffBezanson
Copy link
Member Author

Ready for review.

Now that we have #35157, this should be able to work without affecting other functions that happen to be in the same llvm module.

@JeffBezanson JeffBezanson added the needs news A NEWS entry is required for this change label Apr 2, 2020
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have new numbers for this?

@JeffBezanson
Copy link
Member Author

With this, setting @optlevel 1 in Plots.jl takes the time from 18.5 sec to 13.5 sec.

@JeffBezanson JeffBezanson removed the needs news A NEWS entry is required for this change label Apr 3, 2020
@JeffBezanson
Copy link
Member Author

Ok I think this is ready to go.

@JeffBezanson JeffBezanson merged commit 78e4c2d into master Apr 6, 2020
@JeffBezanson JeffBezanson deleted the jb/permoduleopt branch April 6, 2020 17:28
@chriselrod
Copy link
Contributor

chriselrod commented Apr 8, 2020

I think this PR caused #35393 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:codegen Generation of LLVM IR and native code latency Latency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants