My Recent Pastes (891 and counting)

Pastes by headius (891 and counting)

Pages:

Below are the 15 most recent pasties by headius.

October 29, 2008
3:41PM EDT
by headius

static VALUE
etc_getpwuid(int argc, VALUE *argv, VALUE obj)
{
#if defined(HAVE_GETPWENT)
    VALUE id;

October 29, 2008
2:36PM EDT
by headius

diff --git a/src/org/jruby/RubyBinding.java b/src/org/jruby/RubyBinding.java
index 4c97243..ec9a812 100644
--- a/src/org/jruby/RubyBinding.java
+++ b/src/org/jruby/RubyBinding.java
@@ -91,7 +91,7 @@ public class RubyBinding extends RubyObject {

October 28, 2008
9:41PM EDT
by headius

diff --git a/src/org/jruby/RubyModule.java b/src/org/jruby/RubyModule.java
index 8e6d707..aafdf5d 100644
--- a/src/org/jruby/RubyModule.java
+++ b/src/org/jruby/RubyModule.java
@@ -2563,7 +2563,6 @@ public class RubyModule extends RubyObject {

October 28, 2008
9:14PM EDT
by headius

diff --git a/src/org/jruby/ast/ConstNode.java b/src/org/jruby/ast/ConstNode.java
index 5047abf..125b93c 100644
--- a/src/org/jruby/ast/ConstNode.java
+++ b/src/org/jruby/ast/ConstNode.java
@@ -107,11 +107,11 @@ public class ConstNode extends Node implements INameNode {

October 28, 2008
4:47PM EDT
by headius

## jruby compiled
                                              user     system      total        real
while true, break after 10m               0.624000   0.000000   0.624000 (  0.623272)
while true in block, break after 10m      0.718000   0.000000   0.718000 (  0.718522)
loop do, break after 10m                  1.528000   0.000000   1.528000 (  1.528238)

October 28, 2008
4:35PM EDT
by headius

                                              user     system      total        real
while true, break after 10m               0.758000   0.000000   0.758000 (  0.757350)
while true in block, break after 10m      0.768000   0.000000   0.768000 (  0.767404)
loop do, break after 10m                  1.664000   0.000000   1.664000 (  1.664393)
while true, break after 10m               0.719000   0.000000   0.719000 (  0.719211)

October 28, 2008
2:10PM EDT
by headius

## compiled, before
                                              user     system      total        real
100k * 100 nested const get               1.125000   0.000000   1.125000 (  1.124857)
100k * 100 nested const get               1.085000   0.000000   1.085000 (  1.085750)
100k * 100 nested const get               1.082000   0.000000   1.082000 (  1.081955)

October 28, 2008
12:15PM EDT
by headius

## rbx
                                              user     system      total        real
loop alone                                0.007219   0.000000   0.007219 (  0.007189)
no-element hash                           3.819475   0.000000   3.819475 (  3.819529)
1-element hash                           11.501111   0.000000  11.501111 ( 11.500956)

October 28, 2008
12:07PM EDT
by headius

◆ vm/vm ../jruby/bench/language/bench_method_dispatch.rb 
                                              user     system      total        real
control: 100x x100 local var access       0.132491   0.000000   0.132491 (  0.132477)
core class: 100x x100 Fixnum#to_i         0.920730   0.000000   0.920730 (  0.920807)
ruby method: 100k x100 self.foo           0.920805   0.000000   0.920805 (  0.920874)

October 26, 2008
2:12PM EDT
by headius

~/projects/jruby ➔ jruby --server bench/bench_object_id.rb 
                                    user     system      total        real
control                         0.416000   0.000000   0.416000 (  0.415632)
object_id                       0.315000   0.000000   0.315000 (  0.314386)
control                         0.013000   0.000000   0.013000 (  0.012957)

October 25, 2008
2:49AM EDT
by headius

◆ jruby -X-C -e "[1,2,3].each { puts it }"
1
2
3
## JRuby diff

October 24, 2008
10:10PM EDT
by headius

## Ruby 1.8.6
  1.190000   0.000000   1.190000 (  1.194473)
  1.180000   0.000000   1.180000 (  1.192547)
  1.190000   0.000000   1.190000 (  1.192624)
  1.180000   0.010000   1.190000 (  1.193951)

October 24, 2008
2:24PM EDT
by headius

rubinius headius ◆ vm/vm ../jruby/bench/language/bench_method_dispatch_only.rb 
Test ruby method: 100k loops calling self's foo 100 times
  1.386975   0.000000   1.386975 (  1.387005)
  1.377128   0.000000   1.377128 (  1.377176)
  1.370491   0.000000   1.370491 (  1.370623)

October 24, 2008
2:08PM EDT
by headius

require 'benchmark'

def fib_iter_ruby(n)
   i = 0
   j = 1

October 23, 2008
2:43AM EDT
by headius

    @JRubyMethod(required = 1, rest = true, frame = true, meta = true)
    public static IRubyObject popen3(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block block) {
        Ruby runtime = context.getRuntime();

        try {        

Next page

Previous page