theweipeng opened a new pull request, #1313:
URL: https://github.com/apache/incubator-fury/pull/1313

   ## Refactor the code generator
   1. Currently, JavaScript can only register a Object by Type.object, because 
the generator is too simple
   2. Primitive generator of types like string、number can't be inlined in the 
holder collection, which cause necessary polymorphic that affect the performance
   
   ## Enhancement performance
   1. Currently, Buffer.latin1Slice would transfer from native code generated 
by JIT to v8 runtime, This has a significant impact on performance, so we use 
String.fromCharCode to create little string when the string length is less than 
15.  It is a magic number, but I have tested it and it works fine.
   
   ## Improve
   When useSliceString is disabled, the performance of deserialization improves 
by 100%. It is 3 times faster than native JSON and twice as fast as protobuf.
   
   When useSliceString is enabled, the performance of deserialization improves 
by 30%. It is 5 times faster than native JSON and 3 times faster than protobuf.
   
   ### Before:
   
   #### Disable useSliceString
   
![image](https://github.com/apache/incubator-fury/assets/16490211/83278ece-0eba-4aa5-81a5-e2806bfd1997)
   
   #### Enable useSliceString
   
![image](https://github.com/apache/incubator-fury/assets/16490211/abaeb420-274a-4aae-b432-750e96061668)
   
   ### After:
   #### Disable useSliceString
   
![image](https://github.com/apache/incubator-fury/assets/16490211/2d0e1d3f-e3e4-432e-8b20-8d934b848a76)
   
   #### Enable useSliceString
   
![image](https://github.com/apache/incubator-fury/assets/16490211/a9939cbf-cede-4a1d-8720-ac0f04a3abd6)
   


-- 
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]

Reply via email to