-
Notifications
You must be signed in to change notification settings - Fork 10
Trying some other optimizations beside type-infer #130
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
Conversation
Branch master:
Branch no-type-opt:
It becomes slower... 😢 |
First commit(5ac43d4) on Branch no-type-opt:
|
Second commit(cce6cb3) on Branch no-type-opt:
|
This commit has the least memory allocation, but it doesn't save much time cost. |
Could be that your computer was more busy during the one run versus the other. What you can do to dive deeper into why things are going faster or slower is to put |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand everything. Some suggestions.
Good news about the benchmarking: TuringLang/Turing.jl#1787 is merged, so we can now see the allocations in the integration test.
This reverts commit 316d9f8.
@KDr2 Maybe we should introduce a few benchmark examples that do not depend on Turing. It allows us to better understand the performance bottleneck -- the Turing integration tests are helpful, but it involves many other parts, which make the runtime numbers hard to analyse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, @KDr2 - it looks good to me. I left some minor comments below.
I think we still need some benchmarks before merging. We need to ensure each Instruction
in a TapedFunction
is type-sable, whenever the original function f
underlying TapedFunction
is type-stabe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main suggestion is to use Base.RefValue
instead of Ref
.
It is unclear to me if/how this affects performance. It would be good to perform some benchmarks (or (re-)post them, if they exist - I assumed the comments above are outdated).
many thanks @KDr2! |
No description provided.