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

v1.1.0: C standard mode performance improvements #48

Merged
merged 38 commits into from
Jan 2, 2023
Merged

v1.1.0: C standard mode performance improvements #48

merged 38 commits into from
Jan 2, 2023

Conversation

hit9
Copy link
Owner

@hit9 hit9 commented Dec 31, 2022

  • Improve C bitprotolib performance BpCopyBufferBits
  • Fix bitproto compiler python error for __post_init__ function
  • Improve C bitprotolib performance array of byte; uint8/16/32/64; int8/16/32/64 and enum, alias of them
  • Add a more complex unittest case for encoding/decoding correctness.
  • Add one unittest case on stm32 board.

target v1.1.0 before 2023/01/15.

@hit9 hit9 changed the title (wip) v1.1.0 C performance improvements (wip) v1.1.0: C performance improvements Dec 31, 2022
@hit9 hit9 changed the title (wip) v1.1.0: C performance improvements (wip) v1.1.0: C standard mode performance improvements Dec 31, 2022
@hit9
Copy link
Owner Author

hit9 commented Jan 1, 2023

Benchmark result now:

Standard Mode on STM32F103ZE

@hit9
Copy link
Owner Author

hit9 commented Jan 1, 2023

Benchmark result now:

Standard Mode on STM32F103ZE

  • No gcc -O: 160 μs -> 124 μs on drone.bitproto
  • -O3 mode: 106 μs, 110us

@hit9
Copy link
Owner Author

hit9 commented Jan 1, 2023

Benchmark result now:

Standard Mode on STM32F103ZE

  • No gcc -O: 160 μs -> 123 μs on drone.bitproto
  • -O3 mode: 105 μs, 108

@hit9
Copy link
Owner Author

hit9 commented Jan 2, 2023

Results now, on STM32F103ZE. drone.bitproto 61bytes

  • standard mode, without cc -O: encode 125us, decode 123us
  • standard mode, cc -O2, encode 118us, decode 119us
  • standard mode, cc -O3, encode 108us, decode 105us
  • optimization mode, without cc -O: encode 9us, decode 9us
  • optimization mode, without cc -O2: encode 9us, decode 9us

@hit9
Copy link
Owner Author

hit9 commented Jan 2, 2023

Results now, on STM32F103ZE. drone.bitproto 61bytes

  • standard mode, without cc -O: encode 120us, decode 119us
  • standard mode, cc -O2, encode 115us, decode 118us
  • standard mode, cc -O3, encode 100us, decode 96us
  • optimization mode, without cc -O: encode 9us, decode 9us
  • optimization mode, without cc -O2: encode 9us, decode 9us

@hit9
Copy link
Owner Author

hit9 commented Jan 2, 2023

Results now, on STM32F103ZE. drone.bitproto 61bytes

  • standard mode, without cc -O: encode 117us, decode 118us
  • standard mode, cc -O2, encode 115us, decode 118us
  • standard mode, cc -O3, encode 103us, decode 98us
  • optimization mode, without cc -O: encode 9us, decode 9us
  • optimization mode, without cc -O2: encode 9us, decode 9us

@hit9
Copy link
Owner Author

hit9 commented Jan 2, 2023

Update benchmark bitproto to 100bytes size.

Results now, on STM32F103ZE. drone.bitproto 100bytes

standard mode, without cc -O: encode 147us, decode 146us
standard mode, cc -O2, encode 143us, decode 145us
standard mode, cc -O3, encode 131us, decode 125us
optimization mode, without cc -O: encode 15us, decode 15us
optimization mode, without cc -O2: encode 15us, decode 15us

@hit9
Copy link
Owner Author

hit9 commented Jan 2, 2023

stm32:

no -o 144 143
o2 140 143
o3 128 123

@hit9 hit9 merged commit 1ac8b43 into master Jan 2, 2023
@hit9 hit9 deleted the dev-c-perf branch January 2, 2023 14:11
@hit9 hit9 changed the title (wip) v1.1.0: C standard mode performance improvements v1.1.0: C standard mode performance improvements Jan 2, 2023
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