- Extending -> record module and
method_missing + bind_call
(confirm that bind call doesn't allocate metaclass). - Single generic Relation class. Stop dynamic method generation.
This file contains 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
# frozen_string_literal: true | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'benchmark-ips' | |
end | |
require 'benchmark/ips' |
This file contains 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
RubyVM::InstructionSequence.compile_option = { peephole_optimization: false } | |
class RubyVM::InstructionSequence | |
def self.load_iseq(path) | |
RubyVM::InstructionSequence.compile_file(path) | |
end | |
end | |
# Can be enabled with RUBYOPT="-r /path/to/disable_opt.rb" |
This file contains 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
$ ruby -v | |
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin17] | |
$ ruby yield-vs-block.rb | |
Nested yield stack size: 402 | |
Forward block stack size: 202 | |
Warming up -------------------------------------- | |
baseline 82.138k i/100ms | |
nested-yield 16.030k i/100ms | |
forward-block 28.945k i/100ms | |
Calculating ------------------------------------- |
This file contains 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
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" | |
gem "activerecord", "~> 5.2" |
This file contains 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
#!/bin/bash | |
# See: http://osxdaily.com/2015/10/16/fix-wi-fi-problems-mac-os-x-el-capitan/ | |
sudo rm -f /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist com.apple.network.identification.plist | |
sudo rm -f /Library/Preferences/SystemConfiguration/com.apple.wifi.message-tracer.plist | |
sudo rm -f /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist | |
sudo rm -f /Library/Preferences/SystemConfiguration/preferences.plist | |
sudo reboot |
This file contains 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
byroot@raplh:byroot:$ MISSING_KEY=1 SSHKIT_VERSION=1.10.0 ruby repro-sshkit.rb | |
Fetching gem metadata from https://rubygems.org/ | |
Fetching version metadata from https://rubygems.org/ | |
Resolving dependencies... | |
Using net-ssh 3.2.0 | |
Using bundler 1.12.3 | |
Using net-scp 1.2.1 | |
Using sshkit 1.10.0 | |
INFO [a3263e4e] Running /usr/bin/env echo foo as git@github.com | |
-- Content of known_hosts file: |
This file contains 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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
# Activate the gem you are reporting the issue against. |
This file contains 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
require 'benchmark/ips' | |
require 'active_support/cache' | |
require 'memcached' | |
require 'active_support/cache/memcached_store' | |
require 'active_support/cache/dalli_store' | |
$dalli = ActiveSupport::Cache::DalliStore.new('127.0.0.1:11211') | |
$memcached = ActiveSupport::Cache::MemcachedStore.new('127.0.0.1:11211') | |
KEY = 'somekey' |
This file contains 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
Calculating ------------------------------------- | |
thread-safe 72.674k i/100ms | |
------------------------------------------------- | |
thread-safe 2.128M (± 5.8%) i/s - 10.610M | |
Calculating ------------------------------------- | |
thread-unsafe 109.385k i/100ms | |
------------------------------------------------- | |
thread-unsafe 5.545M (± 7.9%) i/s - 27.565M |
NewerOlder