-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lambda 3% slower in 1.6 pre-release vs 1.5.3 #38911
Comments
That's because the This does make a new function object for each request, but that does not have much overhead, since they can all share the same code (i.e. there is only a single "type" of function, with multiple instances). |
@JeffBezanson Unfortunately, the behavior of this code snippet doesn't fully reflect the behavior of the broader application -- it just demonstrates a case where code is slower on Julia 1.6 development branch. (removed stuff about mutable structs) |
@oscardssmith Observed on Slack that this particular example might be of interest to PR #37849 |
@JeffBezanson I posted a separate, perhaps simpler issue #38936 regarding mutable structs. I think it's intimately related to this one. So, it's OK if this one is closed. |
I'm closing this ticket since I think #38936 is a more concrete example. Thank you. |
For much of the code I'm working with Julia 1.6 seems a good 10-20% faster. For a HypertextLiteral.jl benchmark, I've simulated the construction of a 65K HTML report. In this case, there is a repeatable 6-7% performance drop (~
685μs
to735μs
on my last run). Upon asking on Slack, Valentin Churavy asked if I could try to find a minimal, repeatable test case.The following test case that simulates a critical section, there is an increased runtime of about 3% (
36.2μs
to34.9μs
on my last run) from Julia 1.5.3 (788b2c7) to Julia 1.6.0-DEV.1722 (599d329).If
SText
looks familiar -- it's because it is a replica ofDocs.Text
. I've got a secondary question... why is{T}
needed here, if I remove it and usecontent::Function
the performance hit is substantial. Moreover, when I delete onlymutable
in my broader test case... performance drops almost 2% (on same version of Julia). With this test case, swapping out{T}
gives a good 5% or more drop in performance. It's hard to see the drop in performance whenmutable
is removed... but I'm pretty sure it's there, just tiny. I don't know what I'm actually doing here... am I making a brand new function for each request? Is that bad?Anyway. I hope this is useful. Julia is awesome. The slow-down is also quite acceptable. It was just an outlier in otherwise amazing speedups and I thought 'yall might want to know about it.
The text was updated successfully, but these errors were encountered: