[
https://issues.apache.org/jira/browse/IGNITE-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15904736#comment-15904736
]
Vadim Opolski commented on IGNITE-13:
-------------------------------------
Results of measuring
Benchmark
(message) Mode Cnt Score
Error Units
LatchBenchmark.binaryHeapOutputStreamDirect
TestTestTestTestTestTestTestTestTest avgt 50 128,036 ± 4,360 ns/op
LatchBenchmark.binaryHeapOutputStreamDirect
TestTestTest avgt 50 44,934 ± 1,463 ns/op
LatchBenchmark.binaryHeapOutputStreamDirect
Test avgt 50 21,254 ± 0,776 ns/op
LatchBenchmark.binaryHeapOutputStreamInDirect
TestTestTestTestTestTestTestTestTest avgt 50 83,262 ± 2,264 ns/op
LatchBenchmark.binaryHeapOutputStreamInDirect
TestTestTest avgt 50 58,975 ± 1,559 ns/op
LatchBenchmark.binaryHeapOutputStreamInDirect
Test avgt 50 48,506 ± 1,116 ns/op
> String marshalling can be optimized for binary marshaller
> ---------------------------------------------------------
>
> Key: IGNITE-13
> URL: https://issues.apache.org/jira/browse/IGNITE-13
> Project: Ignite
> Issue Type: Task
> Components: general
> Reporter: Yakov Zhdanov
> Assignee: Vadim Opolski
>
> Currently string serialization is done in two steps (see
> {{BinaryWriterExImpl#doWriteString}}):
> {code}
> strArr = BinaryUtils.strToUtf8Bytes(val); // Encode string into byte array.
> out.writeByteArray(strArr); // Write byte array into stream.
> {code}
> Probably we can write directly into stream while string is encoded, without
> intermediate array. This both reduces memory consumption and eliminates array
> copy step.
> Need to create a micro benchmark first to check if it gives any improvement.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)