Эх сурвалжийг харах

Remove extraneous conversion to byte string

Jon Skeet 16 жил өмнө
parent
commit
25a2792283

+ 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()));