-
-
Notifications
You must be signed in to change notification settings - Fork 556
parallel-letter-frequency: add canonical data #2209
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
parallel-letter-frequency: add canonical data #2209
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.
Something to consider regarding the canonical data for this exercise: We had the data proposed here in the Go track before as well and students were always very disappointed/confused that the concurrent version was not actually faster that the sequencial one. In Go this is easy to access for a student as all tests include benchmarks. I would assume the problem also exists in other languages as concurrency primitives usually have a price that is only worth it if the parallel processing happens for a while.
While "it's not faster" is a nice learning, I am not sure it is the intention of the exercise so this is why I am bringing this up here.
cc @kytrinyx
Here the data we use in the Go track now where you actually see an improvement with the concurrent version:
https://github.com/exercism/go/blob/main/exercises/practice/parallel-letter-frequency/parallel_letter_frequency_test.go
I imagine for some languages you would need an even bigger input to see any benefit.
I did consider including a very large input, but was unsure what people would think. Thoughts? |
I've updated the large texts test case to match the data used in the Go exercise. |
This is exciting! I'm OK with this being merged as is, but here are some thoughts on this:
|
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.
please amend the commit message to include "closes https://github.com/exercism/problem-specifications/issues/574
" or any equivalent string, thank you
b61d450
to
88fd5ee
Compare
I've changed a couple of things:
|
Done. I've also added this to the PR description. |
@junedev @petertseng Are you happy with the changes I made? |
@ErikSchierboom I preferred the version without the last test about the many small inputs. I always saw this exercise as being a good starter to practice concurrency primitives for the first time. I would have left the "tuning how much you do concurrently" part for another exercise. I'm still ok waving this through, just my personal opinion. |
I'm fine with removing it. Let's hear what @petertseng think. |
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.
Hmm, I think that rather depends on the teaching goals of this exercise versus that future exercise. But that exercise doesn't exist yet and this one does now. So what I would think to do is: Take the test with many small texts for now. Once that future exercise is made, stop recommending the test with many small texts, if it's better suited for that exercise.
(Of course, we've discussed in the past we don't have a really good way to say that a test is no longer recommended since reimplements
is the only mechanism, but I don't think that should be considered fatal to this idea)
@junedev would you be okay with that?
I think we might need some way to deprecate a test case without it being reimplemented. |
@ErikSchierboom Whatever you/others think is best is fine for me. I just wanted to mention it has a small drawback, that was all. |
I'm not entirely sure. CC @exercism/reviewers I'd be curious in hearing your thoughts. |
32b659f
to
9fc4e72
Compare
Thanks everyone for chiming in! I've decided to leave the many texts test case in there, as I think it is interesting. |
Closes #574