Browse Source

Remove extraneous conversion to byte string

Jon Skeet 16 năm trước cách đây
mục cha
commit
25a2792283
1 tập tin đã thay đổi với 0 bổ sung1 xóa
  1. 0 1
      src/ProtoBench/Program.cs

+ 0 - 1
src/ProtoBench/Program.cs

@@ -48,7 +48,6 @@ namespace Google.ProtocolBuffers.ProtoBench
         MemoryStream inputStream = new MemoryStream(inputData);
         ByteString inputString = ByteString.CopyFrom(inputData);
         IMessage sampleMessage = defaultMessage.WeakCreateBuilderForType().WeakMergeFrom(inputString).WeakBuild();
-        sampleMessage.ToByteString();
         Benchmark("Serialize to byte string", inputData.Length, () => sampleMessage.ToByteString());
         Benchmark("Serialize to byte array", inputData.Length, () => sampleMessage.ToByteArray());
         Benchmark("Serialize to memory stream", inputData.Length, () => sampleMessage.WriteTo(new MemoryStream()));