[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

Re: $2000 USD Reward for help fixing Segmentation Fault in GC

From: "Meinrad Recheis" <meinrad.recheis@...>
Date: 2007-05-31 12:02:51 UTC
List: ruby-core #11376
On 5/31/07, sur max <sur.max@gmail.com> wrote:
> Hey Meinrad,
>
> I never came across this fact earlier that WeakRef usage can lead to the
> performance loss..
> It will be great if you can provide some links justifying the same.

require "weakref"
require "benchmark"

a=Object.new

puts Benchmark.measure {
	1_000_000.times{ a.to_s }
}

b=WeakRef.new( Object.new )

puts Benchmark.measure {
	1_000_000.times{ b.to_s }
}

=>

  5.032000   0.031000   5.063000 (  5.297000)
 18.172000   0.047000  18.219000 ( 18.375000)

so as you see, the weakref is quite slow (almost factor 4) compared to
direct reference. maybe, if the number of objects in objectspace is
high it is even slower, but i don't know if that is really true. this
was measured with ruby 1.8.5.

In This Thread