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

Add C Extension to optimize building the digest #1

Merged
merged 1 commit into from
Sep 20, 2016

Conversation

DerekStride
Copy link
Owner

@DerekStride DerekStride commented Sep 16, 2016

I ran the following benchmark on master and this branch and got the following results.

Benchmark.bmbm do |x|
  x.report('1 000 000') { 1_000_000.times { hexdigest([{foo: 1}]) } }
  x.report('10 000 000') { 10_000_000.times { hexdigest([{foo: 1}]) } }
end

Master

. . . Rehearsal ----------------------------------------
1 000 000    8.350000   0.040000   8.390000 (  8.407654)
10 000 000  80.260000   0.260000  80.520000 ( 80.589933)
------------------------------------ total: 88.910000sec

                 user     system      total        real
1 000 000    7.830000   0.010000   7.840000 (  7.846316)
10 000 000  79.380000   0.240000  79.620000 ( 79.708873)
. . .

This branch with the extension

. . . Rehearsal ----------------------------------------
1 000 000    6.860000   0.010000   6.870000 (  6.882910)
10 000 000  68.250000   0.120000  68.370000 ( 68.382764)
------------------------------------ total: 75.240000sec

                 user     system      total        real
1 000 000    6.840000   0.010000   6.850000 (  6.849427)
10 000 000  68.700000   0.160000  68.860000 ( 68.899472)
. . .

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.

1 participant