-
Notifications
You must be signed in to change notification settings - Fork 105
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
Operation-specific inline compilation #143
Comments
This is definitely possible for This is a big win for static paths. With dynamic paths this style of composition requires composition to happen from the end to the front, so you couldn't precompile Seems like this functionality is exactly what's needed to get the |
Ran some benchmarks by doing this form of compilation manually and the improvement for |
Since sequences of |
Another possibility would be for navigators to be able to provide inline code to use for selection or transformation if the full path is known statically. This would be a navigator agnostic solution that could speed up use cases besides |
Another optimization possibility is removing no-ops for specific operations. For instance, |
As with many other issues, I am not even sure what is the goal with this, but I wanted to thank you for all your work. Specter dramatically helps me with my current project (mainly binary trees stuff). Bravo! Happy new year sir. |
transform
could run more efficiently by baking thetransform-fn
into the path. At the callsite, composition could work like this instead:This is more efficient than standard compilation. Standard compilation needs to allocate anonymous function objects at runtime, which is ultimately caused by the fact it is unknown how the path will be used or whether it will be further composed.
By adding some sort of concept of "final path" to the inline compiler, this should be achievable.
It should also be investigated whether something similar is possible for
select
operations.The text was updated successfully, but these errors were encountered: