An implementation idea occurred to me that I may not have time to implement tonight. It must be recorded for posterity.One big issue with the current ObjectSpace is the HashSet used to hold all those WeakRefs. So each object that's created gets a WeakRef added to the hashset. When the object is col
I gave this impl a shot and it didn't speed up what I was testing, gem's generation of ri and rdoc for rake. That's not to say it isn't faster, but it seemed to be a tad slower in this one instance. It could use more testing though...it seems like it oughta be faster.
One question: It seems that it
This looks like a clever implementation. I'll try to wire it in and see what sort of numbers I get on my microbenchmarks. On 6/6/06, Chris Nokleberg <
[EMAIL PROTECTED]> wrote:I've attached a lightly-tested sample alternative ObjectSpace
implementation that you might use for inspiration. It is pure
On 6/5/06, Ola Bini <[EMAIL PROTECTED]> wrote:
The point of this exercise being that it _should_ be dead fast to createa new WeakReference, and add at the end of an arraylist. If somethingactually wants to iterate over ObjectSpace, this will be slower, since
we do both cleanup and hash all the obje
Tom and I already discussed it and agreed to leave it enabled, with a tuning option to turn it off. There's not going to be any way to speed it up, but we'll have to just accept it for general run scenarios. There's still the debug hook option to be explored, but I'm not going to expend anymore tim
On 6/5/06, Charles O Nutter <[EMAIL PROTECTED]> wrote:
Object Creation Without OS:
- instantiate object (cheap)
- set RubyClass (cheap if we reference builtin classes directly)
- set tainting (cheap)
Object Creation With OS:
- all of the above plus...
- list maintenance (potentially very expensiv
: jruby-devel@lists.sourceforge.net
Subject: Re: [Jruby-devel] ObjectSpace, again.
On Monday 05 June 2006 11:20 am, Charles O Nutter wrote:
> I tried a very naive version of this, just to demonstrate the
performance
> gain.
>
> First off, if you never call cleanup during add, the size of t
I've attached a lightly-tested sample alternative ObjectSpace
implementation that you might use for inspiration. It is pure-Java (no
JRuby stuff) so you'll have to adapt it.
The key points are:
- A list of arrays of references is used instead of just a list of
references. This gives you more co
On Tue, 06 Jun 2006, David Corbin defenestrated me:
> On Monday 05 June 2006 11:20 am, Charles O Nutter wrote:
> >
> > At this point, my vote goes to OS being disabled by default, with a flag to
> > turn it on.
>
> I'm sorry, but you must be joking. It's an integral part of what Ruby is.
> Just
On Monday 05 June 2006 11:20 am, Charles O Nutter wrote:
> I tried a very naive version of this, just to demonstrate the performance
> gain.
>
> First off, if you never call cleanup during add, the size of the list will
> quickly grow to consume all memory. The objects the weakrefs point at will
>
I tried a very naive version of this, just to demonstrate the performance gain.
First off, if you never call cleanup during add, the size of the list
will quickly grow to consume all memory. The objects the weakrefs point
at will be collected, but the weakrefs themselves will not. Some
cleanup is
Hi.
The big problem with ObjectSpace seems to be that it punishes even those
who aren't using it in the current implementation. If we changed the
implementation to something like this:
private List references = new ArrayList();
private Set realReferences = null;
private ReferenceQueue
12 matches
Mail list logo