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

Exception overhead #6

Open
fedjabosnic opened this issue Jun 12, 2017 · 0 comments
Open

Exception overhead #6

fedjabosnic opened this issue Jun 12, 2017 · 0 comments

Comments

@fedjabosnic
Copy link
Owner

@GeorgeF0 From some simple experimentation, throwing/catching exceptions is pretty heavy relative to how quickly we can parse fix messages - parse failures cause a 10-40x spike in latency and a bunch of allocations to boot. As an example, average sized messages are successfully parsed in 1us but this spikes to 40us when a parsing exception occurs...

We should definitely stop using exceptions for control flow in the parsing functions but we might want to consider alternatives in the rest of the codebase too...

Definitely requires more benchmarks/tests as I've done very little...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant