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

Optimize division by a constant which is not a power of two #35

Open
emilaxelsson opened this issue Nov 5, 2012 · 1 comment
Open

Comments

@emilaxelsson
Copy link
Member

From the old trac:

Currently we only optimize division by a constant when it is a power of two. This is the simple case; division can be replaced by a right shift. But it is also possible to optimize the general case.

@josefs
Copy link
Contributor

josefs commented Nov 5, 2012

I have some Haskell code which can be used to transform division by a constant into multiplication and addition. It should be fairly straightforward to port it to Feldspar.

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