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
--- full.txt 2020-03-05 17:04:32.230794000 +0900 | |
+++ short.txt 2020-03-05 17:04:38.445322000 +0900 | |
@@ -1,179 +1,3 @@ | |
-1.8.5-p52 | |
-1.8.5-p113 | |
-1.8.5-p114 | |
-1.8.5-p115 | |
-1.8.5-p231 | |
-1.8.6 | |
-1.8.6-p36 |
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
From https://github.com/mame/optcarrot@master (80760d237159e84a8e6f937de35d0001c59275a6) | |
with | |
$ $RUBY bin/optcarrot -b --print-fps-history -f 3000 examples/Lan_Master.nes | |
--print-fps-history to verify the final score is close to the rest | |
-f 3000 to make sure there is more than enough warmup | |
Using the latest release of each implementation. | |
$ ruby ... | |
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux] |
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
#!/usr/bin/env ruby | |
require "open-uri" | |
require "json" | |
unless ARGV[0] =~ %r{\Ahttps://bugs.ruby-lang.org/issues/(\d+)\z} | |
puts "Usage: #$0 https://bugs.ruby-lang.org/issues/XXXX" | |
exit 1 | |
end |
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_relative '../../spec_helper' | |
require 'thread' | |
describe "ConditionVariable#signal" do | |
it "returns self if nothing to signal" do | |
cv = ConditionVariable.new | |
cv.signal.should == cv | |
end | |
it "returns self if something is waiting for a signal" do |
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_relative '../../spec_helper' | |
require 'thread' | |
describe "ConditionVariable#signal" do | |
it "returns self if nothing to signal" do | |
cv = ConditionVariable.new | |
cv.signal.should == cv | |
end | |
it "returns self if something is waiting for a signal" do |
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
def length1(a, b, c) | |
a.size + b.size + c.size | |
end | |
def length2(a, b, c) | |
a.size + b.size + c.size | |
end | |
def length3(a, b, c) | |
a.size + b.size + c.size |
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
# Using a custom #measure method to minimize overhead and code loaded | |
def measure | |
t0 = Process.clock_gettime(Process::CLOCK_THREAD_CPUTIME_ID, :nanosecond) | |
yield | |
t1 = Process.clock_gettime(Process::CLOCK_THREAD_CPUTIME_ID, :nanosecond) | |
puts (t1-t0)/1e9 | |
end | |
def req(x) | |
x |
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
lines = File.readlines(ARGV[0], chomp: true) | |
min_time = Float(ARGV[1] || 1.0) | |
data = lines.grep(/^[+]+\s*(\d+\.\d+)/).map { |line| | |
line =~ /^[+]+\s*(\d+\.\d+)/ or raise line | |
[Float($1), $'] | |
} | |
class Float |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
source 'https://rubygems.org' | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
# ruby '2.6' | |
# Full-stack web application framework. | |
gem 'rails', github: 'rails/rails' |