Skip to content

parser optimizations - #360

Merged
onur-ozkan merged 2 commits into
mavlink:masterfrom
onur-ozkan:parser-optimizations
Aug 15, 2025
Merged

parser optimizations#360
onur-ozkan merged 2 commits into
mavlink:masterfrom
onur-ozkan:parser-optimizations

Conversation

@onur-ozkan

Copy link
Copy Markdown
Member

MavXmlFilter::filter should be about twice as fast compared to the previous version, and invoking to_pascal_case should also be quite faster compared to the previous version as its inner logic is much cheaper and is now forced to be inlined (since it is frequently called in loops).

Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
@joaoantoniocardoso

Copy link
Copy Markdown
Contributor

The code looks fine, but since the goal is speed optimization, did you measure it?

@onur-ozkan

Copy link
Copy Markdown
Member Author

The code looks fine, but since the goal is speed optimization, did you measure it?

No, I would have shared it otherwise. It is so obvious I didn't think of measuring it.

@joaoantoniocardoso joaoantoniocardoso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I've just quickly measured here w/ criterion, the new to_pascal_case is around 5x faster =)

@onur-ozkan
onur-ozkan merged commit 9873d6a into mavlink:master Aug 15, 2025
45 checks passed
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.

2 participants