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

Specialize for small number of elements #170

Closed
julienrf opened this Issue Jul 25, 2017 · 14 comments

Comments

Projects
None yet
2 participants
@julienrf
Contributor

julienrf commented Jul 25, 2017

Set and Map, for instance.

@julienrf julienrf added this to the 0.4.0 milestone Jul 25, 2017

@EPronovost

This comment has been minimized.

Show comment
Hide comment
@EPronovost

EPronovost Aug 25, 2017

Contributor

What sorts of specializations would you mean? For storage, I could think of using an Array or List for a Set if it's sufficiently small. Or do you mean algorithm optimizations, like switching from merge sort to bubble sort for sufficiently small sequences?

Contributor

EPronovost commented Aug 25, 2017

What sorts of specializations would you mean? For storage, I could think of using an Array or List for a Set if it's sufficiently small. Or do you mean algorithm optimizations, like switching from merge sort to bubble sort for sufficiently small sequences?

@julienrf

This comment has been minimized.

Show comment
Hide comment
@julienrf

julienrf Aug 26, 2017

Contributor
Contributor

julienrf commented Aug 26, 2017

@EPronovost

This comment has been minimized.

Show comment
Hide comment
@EPronovost

EPronovost Aug 27, 2017

Contributor

Where is HashMap2 implemented? I only found HashMap1, and then HashTrieSet for n > 1.

Contributor

EPronovost commented Aug 27, 2017

Where is HashMap2 implemented? I only found HashMap1, and then HashTrieSet for n > 1.

@julienrf

This comment has been minimized.

Show comment
Hide comment
@julienrf

julienrf Aug 28, 2017

Contributor

Hey @EPronovost are you currently working on this issue? I was thinking of working on it but I don’t want to step on your toes :)

Contributor

julienrf commented Aug 28, 2017

Hey @EPronovost are you currently working on this issue? I was thinking of working on it but I don’t want to step on your toes :)

@EPronovost

This comment has been minimized.

Show comment
Hide comment
@EPronovost

EPronovost Aug 28, 2017

Contributor

@julienrf Yes. I wrote a HashSet2 yesterday. The existing collections library goes up to Set4. How far should we go? How can I measure improvements in performance? Also, are there correctness tests for HashSet?

Contributor

EPronovost commented Aug 28, 2017

@julienrf Yes. I wrote a HashSet2 yesterday. The existing collections library goes up to Set4. How far should we go? How can I measure improvements in performance? Also, are there correctness tests for HashSet?

@julienrf

This comment has been minimized.

Show comment
Hide comment
@julienrf

julienrf Aug 28, 2017

Contributor

Awesome! You can just run the HashSetBenchmarks with the following sbt command:

timeBenchmark/charts HashSetBenchmark

Both the HashSetBenchmark and ScalaHashSetBenchmark will run and produce images with charts in the target directory. However, there is a known issue with the charts generation (see #163) so you might want to temporarily disable the size 0 in the benchmarks.

Contributor

julienrf commented Aug 28, 2017

Awesome! You can just run the HashSetBenchmarks with the following sbt command:

timeBenchmark/charts HashSetBenchmark

Both the HashSetBenchmark and ScalaHashSetBenchmark will run and produce images with charts in the target directory. However, there is a known issue with the charts generation (see #163) so you might want to temporarily disable the size 0 in the benchmarks.

EPronovost added a commit to EPronovost/collection-strawman that referenced this issue Aug 30, 2017

@EPronovost

This comment has been minimized.

Show comment
Hide comment
@EPronovost
Contributor

EPronovost commented Aug 30, 2017

@julienrf

This comment has been minimized.

Show comment
Hide comment
@julienrf

julienrf Aug 30, 2017

Contributor

Thanks for the pointer. Is it fine for you if I merge your commit and continue on top of it?

Contributor

julienrf commented Aug 30, 2017

Thanks for the pointer. Is it fine for you if I merge your commit and continue on top of it?

@EPronovost

This comment has been minimized.

Show comment
Hide comment
@EPronovost

EPronovost Aug 30, 2017

Contributor

Sure thing! What are the permissions settings for me contributing to the main repo?

Contributor

EPronovost commented Aug 30, 2017

Sure thing! What are the permissions settings for me contributing to the main repo?

@julienrf

This comment has been minimized.

Show comment
Hide comment
@julienrf

julienrf Aug 30, 2017

Contributor

I think I will just cherry-pick your commit. Otherwise you can open a PR if you want to.

Contributor

julienrf commented Aug 30, 2017

I think I will just cherry-pick your commit. Otherwise you can open a PR if you want to.

@EPronovost

This comment has been minimized.

Show comment
Hide comment
@EPronovost

EPronovost Aug 30, 2017

Contributor

Sounds good go ahead.

Contributor

EPronovost commented Aug 30, 2017

Sounds good go ahead.

@EPronovost

This comment has been minimized.

Show comment
Hide comment
@EPronovost

EPronovost Aug 31, 2017

Contributor

@julienrf I can open a PR as well, but what branch should I target?

Contributor

EPronovost commented Aug 31, 2017

@julienrf I can open a PR as well, but what branch should I target?

@julienrf julienrf added in progress and removed ready labels Aug 31, 2017

@julienrf julienrf self-assigned this Aug 31, 2017

julienrf added a commit that referenced this issue Aug 31, 2017

@julienrf

This comment has been minimized.

Show comment
Hide comment
@julienrf

julienrf Sep 1, 2017

Contributor

Closed by #216

Contributor

julienrf commented Sep 1, 2017

Closed by #216

@julienrf julienrf closed this Sep 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment