-
-
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
expose sincos? #10442
Comments
I would submit a PR for this, but I don't know how to wrap the libm signature of |
Some previous discussion on julia-users: I think the easiest solution might be simply to implement these in Julia: we already have the |
@simonbyrne, could you give a hint on how to put all the pieces together to test this out if I don't care about arguments |
We should also use this for |
@mlubin I had something in mind like this: It still does seem to be a bit slower, but I haven't really done any profiling to find out where the problem is. UPDATE: the overhead is the array allocation for ccall, even when that branch is never called. If it is commented out, I see a small (10% or so) speed up over separate |
Cool! Is there any extra speedup from combining the
computations across |
From what I can tell, if you |
with the ccall work that's being merged soon, you can replace 1-value Arrays with |
This can also give a tremendous speedup for |
This requires better optimization before it can be implemented. |
I'm unclear on why we can't just expose |
What's the "other stuff is suggested"? |
I.e. why can't we expose a |
We can define |
Well, |
meh: destructuring complex numbers seems a little too magical. I don't think it's too hard to do I would be in favour of a |
Hi, sorry for posting on such an old issue, but I also need the function
I am on Windows 10 64-bit. Can you tell me where I can find the function? |
#21589 was merged post 0.6. It's on julia master. |
GNU libm and openlibm both implement
sincos
:LLVM also has a sincos intrinsic.
Could we expose this? I observed a 30% speedup by calling sincos over sin and cos separately when using the openlibm implementation. Ideally this would be a compiler optimization, but since we're not using the LLVM intrinsics for sin and cos, I'm guess that we won't easily get LLVM to do this for us for free.
In DualNumbers, this would be very useful since computing either sin or cos of a
Dual
requires both values, which in turn would speed up derivative evaluation in JuMP.The text was updated successfully, but these errors were encountered: