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

Micro-optimizations to interpreter performance #1

Closed
tuxology opened this issue Sep 17, 2015 · 2 comments
Closed

Micro-optimizations to interpreter performance #1

tuxology opened this issue Sep 17, 2015 · 2 comments

Comments

@tuxology
Copy link

This is based on just a cursory look to the code so please feel free to reject this if you feel so.

The current interpreter seems to be using a switch-case dispatch mechanism. You can improve the performance a little by using better mechanisms like direct or in-line threaded dispatch as described here. It however needs compiler support for labels as values usage so you can probably use the switch-case as a fallback as well.

The kernel's eBPF interpreter is using that already and I took it for my experiments :)

@rlane
Copy link
Owner

rlane commented Sep 18, 2015

Thanks for the note. My thought was to keep the interpreter simple and rely on the JIT for performance.

Here's an interesting paper I found recently that talks about dispatch performance: https://hal.inria.fr/hal-01100647/document.

ps. We've moved the official repo to http://github.com/iovisor/ubpf. I just turned on GitHub issues there.

@tuxology
Copy link
Author

OK, this is interesting :) Indeed, JIT is the way to go!

rlane referenced this issue in floodlight/ubpf Sep 27, 2015
eBPF.md has been moved to iovisor/bpf-docs
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

No branches or pull requests

2 participants