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 expensive for a set or growing arraylist)
- hashing (if using a set) (very expensive)
- WeakRef creation (cheap)
- cleanup (expensive)
Don't forget synchronization of said list, that's probably one of the more expensive pieces.
At this point, my vote goes to OS being disabled by default, with a flag to turn it on.
If you're aiming for compatibility with C Ruby, don't you think you'd want it the other way around? For example, one of the first classes I'd think to use with JRuby is Test::Unit, which uses ObjectSpace to collect tests to run. Just a thought...
/Nick
_______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel