[jruby-dev] Disabling id2ref when ObjectSpace is off

2009-05-13 Thread Charles Oliver Nutter
Anyone have any objections to disabling id2ref when ObjectSpace is not enabled? Right now, in order to support this, we have to start tracking a weak reference to the object whenever you request #object_id. Since most people don't actually use that ID for anything other than a number, we could

Re: [jruby-dev] Disabling id2ref when ObjectSpace is off

2009-05-13 Thread Charles Oliver Nutter
Charles Oliver Nutter wrote: Here's a comparison of performance for Object#object_id with and without ObjectSpace enabled (with id2ref disabled when ObjectSpace is disabled): Before: 1M calls to Object#object_id0.388000 0.00 0.388000 ( 0.388000) After: 1M calls to Object#object_id

Re: [jruby-dev] Disabling id2ref when ObjectSpace is off

2009-05-14 Thread Wayne Meissner
2009/5/14 Charles Oliver Nutter : > Anyone have any objections to disabling id2ref when ObjectSpace is not > enabled? Right now, in order to support this, we have to start tracking a > weak reference to the object whenever you request #object_id. Since most > people don't actually use that ID for a

Re: [jruby-dev] Disabling id2ref when ObjectSpace is off

2009-05-14 Thread Charles Oliver Nutter
Wayne Meissner wrote: Can we leave this until 1.4 ? Nokogiri uses id2ref to map from a pointer to a ruby object. Since this usage is going to be pretty common in FFI, I can make a specific api for it, but thats not going to happen overnight. Besides .. you need to leave some of the performance