Sha256: be12f53c7c6da65fbd38e2d0b400321084ec693b94b4ffe706ee36e900b13a82

Contents?: true

Size: 697 Bytes

Versions: 21

Compression:

Stored size: 697 Bytes

Contents

# frozen_string_literal: true

require 'bundler/setup'
require 'duckdb'
require 'stackprof'

db = DuckDB::Database.open
con = db.connect
con.query('CREATE TABLE hugeints (hugeint_value HUGEINT)')
con.query('INSERT INTO hugeints VALUES (123456789012345678901234567890123456789)')
result = con.query('SELECT hugeint_value FROM hugeints')

def profile(name, &block)
  profile = StackProf.run(mode: :wall, interval: 1_000) do
    2_000_000.times(&block)
  end

  result = StackProf::Report.new(profile)
  puts
  puts "=== #{name} ==="
  result.print_text
  puts
end

profile(:_to_hugeint) { result.send(:_to_hugeint, 0, 0) }
profile(:_to_hugeint_internal) { result.send(:_to_hugeint_internal, 0, 0) }

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
duckdb-1.0.0.2 benchmark/to_hugeint_profile.rb
duckdb-1.0.0.1 benchmark/to_hugeint_profile.rb
duckdb-1.0.0.0 benchmark/to_hugeint_profile.rb
duckdb-0.10.2.0 benchmark/to_hugeint_profile.rb
duckdb-0.10.1.1 benchmark/to_hugeint_profile.rb
duckdb-0.10.1.0 benchmark/to_hugeint_profile.rb
duckdb-0.10.0.0 benchmark/to_hugeint_profile.rb
duckdb-0.9.2.3 benchmark/to_hugeint_profile.rb
duckdb-0.9.2.2 benchmark/to_hugeint_profile.rb
duckdb-0.9.2.1 benchmark/to_hugeint_profile.rb
duckdb-0.9.2 benchmark/to_hugeint_profile.rb
duckdb-0.9.1.2 benchmark/to_hugeint_profile.rb
duckdb-0.9.1.1 benchmark/to_hugeint_profile.rb
duckdb-0.9.1 benchmark/to_hugeint_profile.rb
duckdb-0.9.0.1 benchmark/to_hugeint_profile.rb
duckdb-0.9.0 benchmark/to_hugeint_profile.rb
duckdb-0.8.1.3 benchmark/to_hugeint_profile.rb
duckdb-0.8.1.2 benchmark/to_hugeint_profile.rb
duckdb-0.8.1.1 benchmark/to_hugeint_profile.rb
duckdb-0.8.1 benchmark/to_hugeint_profile.rb