chaokunyang commented on code in PR #2375:
URL: https://github.com/apache/fory/pull/2375#discussion_r2184223817
##########
java/fory-core/src/main/java/org/apache/fory/serializer/SerializationBinding.java:
##########
@@ -227,42 +227,22 @@ public void writeNonRef(MemoryBuffer buffer, Object obj,
ClassInfoHolder classIn
@Override
public void writeNullable(MemoryBuffer buffer, Object obj) {
- if (obj == null) {
- buffer.writeByte(Fory.NULL_FLAG);
- } else {
- buffer.writeByte(NOT_NULL_VALUE_FLAG);
- writeNonRef(buffer, obj);
- }
+ fory.writeNullable(buffer, obj);
Review Comment:
Manually inline have better performance. JVM JIT nto always inline those
calls
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]