-
Notifications
You must be signed in to change notification settings - Fork 104
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
(Profiled) Code spends most of its time in Internal.Devel.check
#317
Comments
I have no idea - if you could post an example, I could investigate a bit further. |
I just found the same. I attached the profile file. EDIT: forked the repository and tried it without the error check function which sped up the particular part of my code about 10 fold (from 44sec to 4sec). EDIT 2: Turns out, as suspected, being lazy, this never evaluated the FFI call. I suppose this implies that the issue can be closed. |
@StefanHubner Thanks for investigating - just to be clear: this speed up only happens when profiling? So the problem seems to be one with profiling not with hmatrix itself? |
@idontgetoutmuch No, the speed-up came from it never being evaluated. The error code checking is not costly but the computational expense of the FFI call is attributed to the check function. |
I am having the same issue. It seems that the FFI call is evaluated when the error value is checked, and so, the computation happens in EDIT: The actual computation is a Matrix-Vector multiplication and a dot product alla |
I think we could very well inline calls to |
I just profiled some
hmatrix
heavy code and found that it spends 70% of its time inInternal.Devel.check
which sounds strange to me. From what I gathered that function is used to check the return code of the FPU?To be fair, this might be an non issue when the code is running not profiled due to optimizations kicking in?
The text was updated successfully, but these errors were encountered: