-
Notifications
You must be signed in to change notification settings - Fork 323
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
Benchmark shall loop correctly #7781
Conversation
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.
Nice observation. I haven't noticed that at all. By the way, this is precisely the use-case, where versioning of benchmarks (mentioned in #5714) would be beneficial.
At the end the slowdown doesn't seem that bad. Maybe I skewed measurements on my local computer earlier today. |
|
||
sum_multi list (acc:Text|Decimal|Integer|Any) = | ||
case list of | ||
Nil -> acc | ||
Cons x xs -> @Tail_Call sum xs acc+x | ||
Cons x xs -> @Tail_Call sum_multi xs acc+x |
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.
Bench runs in between 140-150ms per operation.
|
||
sum_int list (acc:Integer) = | ||
case list of | ||
Nil -> acc | ||
Cons x xs -> @Tail_Call sum xs acc+x | ||
Cons x xs -> @Tail_Call sum_int xs acc+x |
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.
Bench runs in between 140-150ms per operation.
@@ -104,17 +104,17 @@ sum_conv list (acc:V) = | |||
sum_any list (acc:Any) = | |||
case list of | |||
Nil -> acc | |||
Cons x xs -> @Tail_Call sum xs acc+x | |||
Cons x xs -> @Tail_Call sum_any xs acc+x |
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.
Bench runs in between 140-150ms per operation.
ListBenchmarks_mapOverList also runs in between 140-150ms. Let's integrate. |
Pull Request Description
Many
ListBenchmarks
were wrong. They were looping tosum
instead ofsum_xyz
. Expect regressions, but more truthful results.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Java,