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

Update library sites to make use of Invoker system #204

Open
arthurp opened this issue Jul 13, 2017 · 4 comments
Open

Update library sites to make use of Invoker system #204

arthurp opened this issue Jul 13, 2017 · 4 comments

Comments

@arthurp
Copy link
Member

arthurp commented Jul 13, 2017

The new Invoker system enables sites to separate dispatch (on types or values) from the actual execution of the call. This will be a very important performance feature for the PorcE backend and potentially even the Token interpreter. Sites should be changed to use the new features. Any site which performs complex dispatch based on the argument types or values could gain from it.

The most obvious sites that would gain from this are the numeric computation sites (Add, Mult, UMinus, etc) since the returned invoker could be specialized to the argument types. In fact, Add is by far the most important of these because it also handles strings.

@arthurp
Copy link
Member Author

arthurp commented Aug 3, 2017

Another set of sites that will gain from this will be Tuples and related sites.

@arthurp
Copy link
Member Author

arthurp commented Sep 8, 2017

I just realized that, probably the most important sites to convert are Ift and Iff (and any other low-level primitive sites) and the Flag sites used in Porc. These sites are used in almost all code even if the code doesn't explicitly reference them (since they are used in pattern matching and other generated elements). In addition they will compile down very efficiently if Truffle can inline them.

For some of these sites it might even be worth providing special PorcE implementations which can be fully partially evaluated.

@jthywiss
Copy link
Member

jthywiss commented Sep 8, 2017

I look forward to the elimination of the 1200 compile warnings commit ce7db07 caused. :)

@arthurp
Copy link
Member Author

arthurp commented Sep 8, 2017

Sadly for you that's not this issue. The one that will good that is #206.

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

2 participants