Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix marshal smallint - optimization #315

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

illia-li
Copy link

Changes:

Marshal functions:

  • unnecessary value type conversion has been removed.
  • unnecessary dereference has been removed.
  • removed unnecessary value checks for reflect.Int8,reflect.Int16,reflect.Uint8,reflect.Uint16 kinds
  • makes the right value type in the error of the EncReflect function

Unmarshal functions:

  • unnecessary value type conversion has been removed.
  • redo the functions for the double references values.
  • the condition data == nil moved after the condition len(data)==0 in the functions of the double references values.

change `EncInt8` function:
* unnecessary value conversion has been removed.

change in `EncBigIntR`:
* unnecessary dereference has been removed.

changes in `EncReflect` function:
* removed unnecessary checks for `reflect.Int8`,`reflect.Int16`,`reflect.Uint8`,`reflect.Uint16` kinds
* makes the right value type in the error of the `EncReflect` function
changes:
* double conversion of values has been removed in the functions of single reference values.
* the condition `data == nil` moved after the condition `len(data)==0` in the functions of the double references values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant