ruby / ruby/digest

Digest is ~5x slower on Ruby 3.x then 2.x

Open
#35 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
51
Forks
37
Avg merge
8h 16m
Merged PRs (30d)
4

Description

Digest is ~5x slower for SHA1, SHA2, and SHA256 on Ruby 3.x compared to Ruby 2.x. See https://gist.github.com/morimori/1330095#gistcomment-3975819 for more details and the benchmark. Note that I tried benchmarking with Ruby 3.0.3 with both Digest 3.0.0 and 3.1.0, as well as Ruby 3.1.0 and still had the same performance. I suspect that it has to do with the extraction of Digest into its own gem.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked gist and its benchmark, reproducing the SHA1, SHA2, and SHA256 comparison across Ruby 2.x and Ruby 3.x with Digest 3.0.0 and 3.1.0. Trace the Digest gem's implementation to identify the source of the regression; done means the cause is addressed and the benchmark no longer shows the reported slowdown.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, ruby
Domain
cryptography, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.