Skip to content
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

Optimize merge #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Optimize merge #2

wants to merge 3 commits into from

Conversation

pguillory
Copy link

@pguillory pguillory commented Mar 26, 2020

Rewrote the merge operations for bitstring and array types to do fewer passes
over the data and generate less intermediate garbage. The existing benchmark
shows about a 5x improvement for Hypex.merge on arrays and 2.5x on bitstrings.

Before:

Name                                    ips        average  deviation         median         99th %
Array Hypex.merge/1                   56.60       17.67 ms    ±12.39%       17.62 ms       24.13 ms
Bitstring Hypex.merge/1               32.72       30.56 ms     ±5.22%       30.14 ms       37.23 ms

After:

Name                                    ips        average  deviation         median         99th %
Array Hypex.merge/1                  269.99        3.70 ms    ±15.78%        3.46 ms        5.71 ms
Bitstring Hypex.merge/1               78.52       12.73 ms    ±38.13%       16.16 ms       23.30 ms

Rewrote the merge operations for bitstring and array types to do fewer passes
over the data and generate less intermediate garbage. The existing benchmark
shows about a 5x improvement for Hypex.merge on arrays and 2.5x on bitstrings.

Before:

  Name                                    ips        average  deviation         median         99th %
  Array Hypex.merge/1                   56.60       17.67 ms    ±12.39%       17.62 ms       24.13 ms
  Bitstring Hypex.merge/1               32.72       30.56 ms     ±5.22%       30.14 ms       37.23 ms

After:

  Name                                    ips        average  deviation         median         99th %
  Array Hypex.merge/1                  269.99        3.70 ms    ±15.78%        3.46 ms        5.71 ms
  Bitstring Hypex.merge/1               78.52       12.73 ms    ±38.13%       16.16 ms       23.30 ms
@coveralls
Copy link

coveralls commented Mar 26, 2020

Pull Request Test Coverage Report for Build 19

  • 7 of 7 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 15: 0.0%
Covered Lines: 53
Relevant Lines: 53

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants