You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by "chaokunyang (via GitHub)" <gi...@apache.org> on 2025/12/06 18:42:22 UTC

[I] [Go] Optimize Go serialization performance with context separation [fory]

chaokunyang opened a new issue, #3016:
URL: https://github.com/apache/fory/issues/3016

   ### Feature Request
   
   _No response_
   
   ### Is your feature request related to a problem? Please describe
   
   The current implementation:
   - Passes multiple parameters to every serialization method
   - Mixes read and write state in a single context
   - Has redundant indirections and flag checks
   - Lacks fast paths for common primitive types
   
   ### Describe the solution you'd like
   
   Implement performance optimizations:
   - Separate `ReadContext` and `WriteContext` to eliminate unnecessary state
   - Add fast paths for primitives (bool, int*, float*, string)
   - Inline common operations for compiler optimization
   - Add fast paths for common collection types ([]int, []string, etc.)
   - Optimize struct field serialization with direct memory access
   
   
   Benefits
   - Reduced method call overhead
   - Better CPU cache utilization
   - Faster serialization for common types
   - More efficient memory access patterns
   
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   #2982 


-- 
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: commits-unsubscribe@fory.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] [Go] Optimize Go serialization performance with context separation [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #3016: [Go] Optimize Go serialization performance with context separation
URL: https://github.com/apache/fory/issues/3016


-- 
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: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org