I had assumed that I *had* ported it from the Java - I have no idea
why I'd do anything else.

However, it certainly doesn't look anything like even r2 of the Java
code, so I'm very confused. I'll port it to look like the Java code :)

Jon

On Dec 31, 5:36 pm, Kenton Varda <ken...@google.com> wrote:
> I think even if some people do persist hash codes, it's worth breaking them
> to fix that hash function.  I guess you didn't directly port from the Java
> code in this case?
>
>
>
> On Thu, Dec 31, 2009 at 3:43 AM, Jon Skeet <sk...@pobox.com> wrote:
> > I've been contact by Ayende Rahien with regard to some optimisations
> > he's been making. Some of these may be due to profiler artefacts, but
> > he's concerned about the hash code of ByteString.
>
> > The full blog post is here:
>
> >http://ayende.com/Blog/archive/2009/12/30/when-mini-benchmarks-are-im...
>
> > Various commenters have commented that the hash code for ByteString is
> > pretty bad. It's relatively easy to fix (without going to the extremes
> > mentioned in the blog post - I don't want to use unsafe code) but that
> > *would* mean losing compatibility with the hash code given by Java. I
> > don't personally have a problem with that - hash codes should almost
> > never treated as persistable - but I wanted to check with others
> > before making a change.
>
> > Any thoughts?
>
> > Jon
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Protocol Buffers" group.
> > To post to this group, send email to proto...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.c 
> > om>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/protobuf?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.


Reply via email to