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

Do JIT compilation based on perf counters #11

Open
chc4 opened this issue Sep 12, 2021 · 0 comments
Open

Do JIT compilation based on perf counters #11

chc4 opened this issue Sep 12, 2021 · 0 comments
Labels
good first issue Good for newcomers

Comments

@chc4
Copy link
Owner

chc4 commented Sep 12, 2021

Currently we block on JIT compilation as soon as we call Jit::speedup. We can instead return a FastFn that delays JIT compilation until it's called, and even better use performance counters like every other JIT on earth to only trigger compilation if it's called >N times, where N is a const generic parameter to the Lineiform trait for compile-time tweaking.

Probably just look up how LuaJIT does fast performance counters to minimize overhead. We might also want to store the performance counters out of band, since optimally we want FastFn to implement Freeze from #4 so we can inline calls to JIT'd closures without having to register them in some map and special casing them?

@chc4 chc4 added the good first issue Good for newcomers label Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant