Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jits on github.
  • I am jits (https://keybase.io/jits) on keybase.
  • I have a public key whose fingerprint is 0DB4 1549 3700 D50E 0F3A B72F E490 CAC9 E0D2 A048

To claim this, I am signing this object:

@jits
jits / links.txt
Last active December 31, 2015 10:46
Links for the slides app
@jits
jits / Example timings
Last active August 29, 2015 14:19
Playing with Scala Lists to Maps
res1: String = Elapsed time: 46446 microseconds
res2: String = Elapsed time: 33675 microseconds
res3: String = Elapsed time: 70051 microseconds
res4: String = Elapsed time: 40251 microseconds
res5: String = Elapsed time: 38201 microseconds
res1: String = Elapsed time: 44123 microseconds
res2: String = Elapsed time: 65585 microseconds
res3: String = Elapsed time: 43811 microseconds
res4: String = Elapsed time: 48572 microseconds
@jits
jits / lambdas.rb
Last active January 3, 2016 13:59 — forked from wuputah/lambda-vs-array.rb
require 'benchmark'
def get_lambda
lambda { }
end
def my_method; end
Benchmark.bmbm do |x|
x.report { 1_000_000.times { method(:my_method) } }
require "benchmark"
puts RUBY_DESCRIPTION
TIMES = 1_000_000
X_STRING = "x"
X_SYMBOL = :x
Benchmark.bm(7) do |x|
require "benchmark"
puts RUBY_DESCRIPTION
class A
attr_accessor :x
end
class B
def y
class ApplicationController < ActionController::Base
protect_from_forgery
rescue_from CanCan::AccessDenied do |exception|
flash[:alert] = exception.message
redirect_to root_url
end
protected