The variables code is/was in place in the bdortch/attrs branch, but I'm moving it to bdortch/vars, with some changes (due in part to much refactoring in trunk since I first wrote it). I plan to work on this tonight and tomorrow (Saturday), and hope to finish it up by Sunday evening, if not sooner. At that point, it will need to be reviewed and tested before being merged to trunk. I'll write up a more detailed note Sunday, but here are a couple of quick items:
- The code addresses symbols, variables (ivars and cvars), and constants, as well as internal (or "special") variables. - In general, synchronized (or synchronized-access) HashMaps are replaced with custom concurrent hash implementations. Also, "fast" accessors are provided that can be used when a variable/constant/symbol name is known to be interned. For single-threaded access, the result is 30-100% faster reads (best improvement is for ivars; constant/cvar/symbol lookup is more complicated, but still much faster). For multi-threaded access, the improvement can be nX faster (I've run benchmarks that show 200-300% better throughput). That probably won't help much for ivars, but symbol and constant lookup should be much improved in multi-threaded applications. - I had played with some initial refactoring of IRubyObject/RubyObject, but don't plan to include that in the bdortch/vars branch. I think this *badly* needs to be done; the current hierarchy is very rigid and forces us into less-than-optimal implementations of built-in objects and Java objects, among other things. (Even without going as far as "lightweight" implementations, there is no reason a RubyFixnum, for example, should need to carry fields for flags, dataStructs, finalizers, instance variables, and so on.) But I think this will need to wait until after 1.1 -- it will be a big change, will likely break external/3rd party code, and needs discussion and debate. Perhaps we should start a thread or JIRA (or some other forum -- Google doc? group?) on JRuby 1.x architecture. I've got a few other notions on the subject, more on this later. - I think the major JI overhaul will also need to wait for post-1.1 -- ideally, after we've reached some conclusions on overall architecture issues. In the meantime, I plan to implement some less-drastic performance improvements over the next couple of weeks. More on this later. Gotta run, will try to hang a bit on #jruby tonight/tomorrow. -Bill On 10/5/07, Charles Oliver Nutter <[EMAIL PROTECTED]> wrote: > > Ok Bill...I know you're out there. It's time we start planning to land > your stuff. We need the perf gains constant and ivar lookup will get, > and the rest of the big changes we need to start discussing. > > I know the code is out there in SVN, but it would be really helpful if > you could give us a dime tour of what's where and what the benefit of > all the changes will be. We're getting into endgame for 1.1 here, and > your stuff is going to be a big part of it. > > So, let's start off the discussion. Take it away, Bill! > > - Charlie > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > >
