Re: Comparing 2 PBs?

2008-10-02 Thread Chris

[EMAIL PROTECTED] wrote:
> What's the "best" (simplest, fastest) way to compare two protocol-
> buffer objects?  (in compiled_for=speed mode)
In what language?

In the Haskell implementation, it adds
 > deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
to each message and this gives you printing, (==),(>),(<), etc.



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



Re: Comparing 2 PBs?

2008-10-01 Thread Kenton Varda
In which language?  In Java you can just use .equals().  In C++, you could
serialize the two and compare the bytes.  Alternatively, you could write
some code that iterates over the fields via reflection and compares them.

On Wed, Oct 1, 2008 at 9:13 AM, <[EMAIL PROTECTED]> wrote:

>
> What's the "best" (simplest, fastest) way to compare two protocol-
> buffer objects?  (in compiled_for=speed mode)
> >
>

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