haskell-org / summer-of-haskell

Source code of summer.haskell.org
http://summer.haskell.org/
Other
85 stars 74 forks source link

Project idea: Enhancing and optimizing unordered-containers #150

Closed sjakobi closed 2 years ago

sjakobi commented 2 years ago

The basic project structure could look like this:

  1. Implement 2 or 3 simple API enhancements like
  2. Fix some simple performance issues like
  3. Implement some slightly more advanced API enhancement like:
  4. Implement some more advanced performance improvement like
  5. Stretch goal: Implement https://github.com/haskell-unordered-containers/unordered-containers/issues/226

Depending on the interests and capabilities of the student they can focus either on feature work or performance work.

For the API enhancements I have a fairly rigid structure in mind that should allow students to incrementally make progress and simplify review for the mentors:

  1. Stub out the added function with the correct type. If there are multiple lazy / strict / HashSet variants, only do the lazy one initially.
  2. Write haddocks.
  3. Add (property) tests. Usually we can simply compare the implementation against Map from containers.
  4. Make the tests pass.
  5. If necessary: Add tests for strictness properties, make them pass.
  6. (Mentors) review the generated Core.
  7. Add benchmarks, comparing against Map / IntMap.
  8. Optional: Optimize implementation
  9. If necessary: Add remaining strict / HashSet variants

Does such a project sound like a good fit for GSoC?

I expect that I can provide most of the mentoring myself. Although ideally there would be second mentor to help with reviews. @treeowl, would you be interested? There's a small probability that we'll encounter performance issues that are beyond my expertise. In that case it would be great if we could consult some experts for advice. @doyougnu, do you think you could help as an advisor?

I'm planning to offer this as a medium size project (~175 hours), mostly because I don't want to overstretch myself in the first time being a primary mentor. The difficulty should be intermediate.

One requirement is that the student should have access to a computer that they can run benchmarks on: It needs to be quiet and reasonably modern (recentish CPU, at least 8GB RAM). Is this an acceptable requirement for GSoC? Otherwise, is this something that Haskell.org or someone else could provide?

jaspervdj commented 2 years ago

I think this sounds like a great project. I'm not sure if we can provide a physical machine but providing something the student can SSH into shouldn't be a problem.

doyougnu commented 2 years ago

@doyougnu, do you think you could help as an advisor?

I'd be more than happy to help as an advisor in this project! Also it could make for a good source of case studies for the proposed haskell optimization handbook.

sjakobi commented 2 years ago

Many thanks for the encouraging feedback, @jaspervdj and @doyougnu!

Unfortunately my plans for this summer have changed, so I probably won't have the time to mentor a GSoC project. Maybe I can do it next year.

doyougnu commented 2 years ago

Aww I'm sorry to hear that. For the record I think this is a great GSoC project. If its picked up next year I'll be more than happy to mentor or shepherd!