Re: Different performance results: Buffered Streams vs. Byte Streams

2009-08-27 Thread Kenton Varda
I really don't know either. On Thu, Aug 27, 2009 at 7:43 PM, Tai wrote: > > Yes. I first write the length of the byte array and then write the > byte array all at once. > > I don't really understand why the results are completely different > when using RMI. So you assume Java is doing some optim

Re: Different performance results: Buffered Streams vs. Byte Streams

2009-08-27 Thread Kenton Varda
Did you try what I suggested before -- serializing to a byte array instead, and then writing that to the stream all at once? It's possible that ObjectOutputStream itself is just really slow, but that when using native Java serialization it uses special, highly-optimized code paths. On Thu, Aug 27,

Re: Different performance results: Buffered Streams vs. Byte Streams

2009-08-27 Thread Tai
Yes. I first write the length of the byte array and then write the byte array all at once. I don't really understand why the results are completely different when using RMI. So you assume Java is doing some optimization? On Aug 28, 4:05 am, Kenton Varda wrote: > Did you try what I suggested bef