-
Notifications
You must be signed in to change notification settings - Fork 125
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
CTZ can be implemented in terms of CLZ #168
Comments
@DemiMarie I think this issue is out of scope. Ewasm does not intend to make any changes to the WebAssembly specification. |
@jakelang I was thinking of the gas prices that Ewasm specifies for these operations, which should be representative of their computational consts on actual hardware. |
For both ctz/clz we have decided to take a fairly naive implementation for calculating the cost to suit all VM implementations. |
@DemiMarie I think this would then be more of a research topic, in that someone should look into whether the major WASM implementations have this optimization. Edit: I am guessing most (compiled) implementations have it, as modern optimizing compilers may introduce such optimizations during compilation even if not specified in the source. |
CTZ can be implemented in terms of CLZ and some form of bit swapping operation. I suspect that there is a faster way of doing this.
The text was updated successfully, but these errors were encountered: