Sha256: a36d749f1586ba0b1a9a4cf6ae82290f8f5ee67a951762b074f49be1198507a8

Contents?: true

Size: 534 Bytes

Versions: 1

Compression:

Stored size: 534 Bytes

Contents

# frozen_string_literal: true

require "bundler/gem_tasks"

require "rspec/core/rake_task"
RSpec::Core::RakeTask.new

require "rubocop/rake_task"
RuboCop::RakeTask.new

task default: %w[spec rubocop]

task :bench do
  require "benchmark/ips"
  require "veriform"

  Benchmark.ips do |b|
    input = "\xE9\xF4\x81\x80\x80\x80@".dup.force_encoding("BINARY").freeze

    b.report("vint64 encode") { Veriform::Varint.encode(281_474_976_741_993) }
    b.report("vint64 decode") { Veriform::Varint.decode(input) }

    b.compare!
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veriform-0.0.0 Rakefile