-
-
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
Performance regression when using FunctionWrappers on Julia 1.4 and 1.5 #36977
Comments
I suspect |
Probably. As codegen has become increasingly restricted from mutating the system in arbitrary ways, we've gotten somewhat worse at this. The current design is intended to allow it to inject the new pointer to replace the shim, but we haven't implemented that update logic yet. |
As of Juila 1.6.1, the example doesn't seem using allocations:
Here is the version info:
|
Seems to be 30% slower in Julia 1.8 from Julia 1.6. |
I just stumbled across this for the first time -- I've checked and this remains a problem on 1.10 (rc2). edit: I'm assuming that the answer is no, but is there a work-around available at present? |
I would love to see a language native typed function that can be bound with a type erased closure, ala what |
note that opaque closures have a number of drawbacks some of which are unavoidable with the current design.
|
🤔 forgive the naivety but isn't that the whole point? |
yes, but it's often not the behavior you want from a functionwrapper |
Copied from: https://discourse.julialang.org/t/performance-and-memory-regression-with-function-wrappers-in-julia-1-4/44589
Setup:
Results
Julia 1.3.1:
Julia 1.4.2:
Julia 1.5.0
Julia 1.6.0-DEV.607
This turns out to be the source of a significant performance regression in Parametron.jl (which was designed to allocate zero memory).
Here's my system info:
@yuyichao pointed to JuliaLang/FunctionWrappers.jl#14 as a related issue. I cannot reproduce the MWE from JuliaLang/FunctionWrappers.jl#14 (comment) on Julia 1.5, but the slowness and extra allocation of my example here is still present in Julia 1.5.0.
The text was updated successfully, but these errors were encountered: