Announcement: micro-libgcj
Mike Emmel
mike.emmel@gmail.com
Fri Jan 6 23:58:00 GMT 2006
On 1/6/06, Boehm, Hans <hans.boehm@hp.com> wrote:
> Apologies for misattributing the statement about hash synchronization.
>> Hans
>> > -----Original Message-----
> > From: Boehm, Hans
> > Sent: Friday, January 06, 2006 3:41 PM
> > To: 'Joel Dice'
> > Cc: Mike Emmel; Martin Egholm Nielsen; java@gcc.gnu.org
> > Subject: RE: Announcement: micro-libgcj
> >
> >
> > > -----Original Message-----
> > > From: Joel Dice [mailto:dicej@mailsnare.net]
> > > Still, there's no reason we can't all have what we want. I'm
> > > happy to add
> > > support for Java-compatible synchronization as a build
> > > option. This would
> > > be any easy task to perform while merging with the GCC tree.
> > > Same goes
> > > for anything else that I've "broken" with respect to Java.
> > > With the right
> > > pre-processor magic, we can all be happy :).
> > >
> > That sounds much better to me. Thanks. It seems to me that
> > having a class that doesn't inherit from Object breaks the
> > standard containers, and probably introduces other problems.
> >
> > When you say that hash synchronization can be slow, are you
> > talking about worst-case times? On a uniprocessor with cheap
> > locks? In a linux-like environment, that shouldn't be true
> > for the average case. Worst-case execution time is another
> > thing (along with space usage for small apps and simplicity)
> > the current implementation was not optimized for.
> >
> > Hans
> >
>
Another approach I just thought of that would be intresting would be
to actually create a hash if its possible that collides on purpose.
Then you could store the class pointer for all instances of a class in
this colliding hash the lock if present could be related to this hash.
I've never seen hash tables designed for collision so I've got no idea
if this is feasible or not in any case it would eliminate the object
header completely.
If the current hash performance is really as fast as you say then
trading away all the header for a hash could be worth it.
Anyway thought it would be worth mentioning.
Mike
More information about the Java
mailing list