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 busybox:1.31.0 | |
ENTRYPOINT ["echo", "it worked"] |
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 'jruby/core_ext' | |
class MyObserver | |
include Java::JavaUtil::Observer | |
def update(observable, arg) | |
puts "UPDATE! #{observable}" | |
end | |
end | |
MyObserver.become_java! false |
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 'bundler' | |
# First attempt a bundle install without remote resolution. In the | |
# happy case, all gems are already installed, and checking this is | |
# quick. If it fails, attempt a remote resolution. This is slow | |
# (probably largely because of how many dang gem versions we have in | |
# our local gem server), but it will install anything that is missing. | |
# | |
# Bundler uses lots of class-level configuration, and thus isn't | |
# designed to be called repeatedly with different options, but we're |
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' | |
A = 'a' | |
B = 'b' | |
C = 'c' | |
D = 'd' | |
E = 'e' | |
F = 'f' | |
G = 'g' | |
H = 'h' |
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
See https://github.com/pmahoney/assets_comp_perf | |
rails 3.2.9, hike 1.2.1, sprockets 2.2.2 | |
* denotes best time | |
Ruby 1.9.3-p194 | |
$ time bundle exec rake assets:clean assets:precompile |
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
Rails 3.1.8 app in Ruby 1.8 compatibility mode with ~65 dependencies | |
(not sure how many in total including | |
transient deps) was timed up to the Bundler.require line in config/application.rb | |
(JRuby 1.7.0) | |
Before: 18.8 seconds | |
After: 15.9 seconds | |
This likely seriously breaks the semantics of 'require', and maybe isn't faster | |
enough to be worth it. |
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
this SunJCE_y (id=144) | |
arg0 true | |
arg1 "DESede/CBC/PKCS5Padding" (id=249) | |
arg2 (id=254) |
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
public class Time { | |
private final long timeInMillis; | |
private final long nsec; | |
public Time(long timeInMillis, long nsec) { | |
this.timeInMillis = timeInMillis; | |
this.nsec = nsec; | |
} |
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 'java' | |
class Task | |
include Java::JavaUtilConcurrent::Callable | |
def initialize(num) | |
@num = num | |
end | |
def call |
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 'java' | |
require 'benchmark' | |
s = Java::JavaLang::String.new('hello') | |
n = 10000000 | |
respond_task = proc { n.times { s.respond_to?(:to_s) || abort('error') } } | |
no_respond_task = proc { n.times { s.respond_to?(:no_method) && abort('error') } } | |
kind_of_task = proc { n.times { s.kind_of?(Java::JavaLang::String) || abort('error') } } | |
no_kind_of_task = proc { n.times { s.kind_of?(Java::JavaLang::Integer) && abort('error') } } |
NewerOlder