This repository was archived by the owner on Sep 10, 2022. It is now read-only.
Use String.build instead of IO::Memory.#5
Open
didactic-drunk wants to merge 4 commits intonoumar:masterfrom
Open
Use String.build instead of IO::Memory.#5didactic-drunk wants to merge 4 commits intonoumar:masterfrom
didactic-drunk wants to merge 4 commits intonoumar:masterfrom
Conversation
Author
|
New benchmark results:
Old benchmark results:
Code: require "benchmark"
require "./src/base32"
bytes1 = "foobarbaz".to_slice
bytes2 = Bytes.new 1024
Benchmark.ips do |bm|
bm.report "encode short" do
Base32.encode bytes1, false
end
bm.report "encode long" do
Base32.encode bytes2, false
end
end |
ffa5dea to
d276e96
Compare
New faster implementation of Base32.encode. Correctly handle NUL bytes. Add NUL spec.
d276e96 to
eb6457a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New faster implementation of Base32.encode.
Correctly handle NUL bytes.
Add NUL spec.