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

Update debugSend / debugSend_P #1788

Merged
merged 4 commits into from
Jun 23, 2019
Merged

Update debugSend / debugSend_P #1788

merged 4 commits into from
Jun 23, 2019

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Jun 23, 2019

  • remove varargs handling from debugSend and debugSend_P
  • chain debugSend_P into basic _debugSend instead of duplicating code, pass va_list between them
  • when possible, use stack buffer and fallback to heap buffer only when it is more that 64 chars
  • check if new[] was successful

@mcspr
Copy link
Collaborator Author

mcspr commented Jun 23, 2019

Having remembered dev...mcspr:ws/optimize, what I did not is template size overhead. I'll inspect it more closely, but this does not look good :/

env:travis01

Size Description
579280 templates, both inline
567008 templates, debugSend_P inline
558752 templates, debugSend inline
558288 templates, no inline
551840 old varargs
570832 debugSend varargs, debugSend_P as macro (basically, inline)
551920 debugSend varargs, debugSend
551856 debugSend_P, debugSend, _debugSend(format, va_list)
551952 debugSend_P, debugSend, inline _debugSend(format, va_list)

"inline" means inline __attribute__((always_inline))

Reverting the template part, but keeping other things

@mcspr mcspr changed the title Templated debugSend / debugSend_P Update debugSend / debugSend_P Jun 23, 2019
@mcspr mcspr merged commit aac36d9 into xoseperez:dev Jun 23, 2019
@mcspr mcspr deleted the debug/check-new branch June 23, 2019 21:30
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