-
Notifications
You must be signed in to change notification settings - Fork 77
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
profiling and optimizations #189
Comments
|
Example of profiling with |
Regarding name mangling I found this but didn't try it: https://discuss.ocaml.org/t/ann-perf-demangling-of-ocaml-symbols-a-short-introduction-to-perf/7143. Supposedly those improvements are also going upstream into perf. |
We currently have a practical course at TUM investigating this and related issues. |
I would suggest to close this issue as we already had a look at optimizing by introducing short-circuiting, caching of options, and using flambda. The remaining issue of profiling and optimization then seems overly broad. |
Close as overly broad for now. We should open dedicated issues if we have new ideas. |
Originally posted by @vogler in #188 (comment)
The assumption was that for
n
activated out ofm
total domains you have for a binopn * (1+2)
(List.map2
+ both args)match
forIntDomList
m
match
forIntDomTuple
.I think I ran some test where it was faster, but would be better to have some inline benchmarks [1] in
bench
for questions like this.The main motivation was to reduce boilerplate and make adding domains easier.
create
/create2
shouldn't be called often compared tomap*
.But good point in general. Maybe it's a good idea to include some memoization for
GobConfig.get_*
instead letting consumers implement it repeatedly.Edit: done: 5c73008
True,
perf report
[2] works but it's hard to find bottlenecks, for example it does not list things likeget_bool
. Haven't tried if enabling frame pointers helps.The equality stuff in
bench/hashcons
also looks interesting. What speaks againstlet (=) a b = a == b || a = b
?[1] https://github.com/Chris00/ocaml-benchmark
[2] https://ocaml.org/learn/tutorials/performance_and_profiling.html#Using-perf-on-Linux
The text was updated successfully, but these errors were encountered: