Sha256: 3eee227b3d177f5bbb154ef57b33a75c95718e047e57aefba15b2baac6c1f8f3

Contents?: true

Size: 520 Bytes

Versions: 1

Compression:

Stored size: 520 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 "zser"

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

    b.report("zsint encode") { Zser::Varint.encode(281_474_976_741_993) }
    b.report("zsint decode") { Zser::Varint.decode(input) }

    b.compare!
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zser-0.0.1 Rakefile