-
Notifications
You must be signed in to change notification settings - Fork 35
Standard libs like Math and polyfills (charCodeAt, fromCharCode, etc) #14
Comments
How you bind Math library to Wasm right now? It seems just import from js according this: https://github.com/01alchemist/TurboScript/blob/master/tests/math-wasm.html.
Sorry, this post MVP feature. Not implement yet. |
Right now importing from JavaScript built-in. I need to implement method overload to use same functions for different signatures like in JavaScript. It's a big task to implement all built-ins manually. We need to wait for WASM 2 Specification to be finalized before implementing this manually. For now, for compatibility we can import slow Math library from JS and gradually add fast implementations in WASM. |
That's right we definitely need fma command for IEEE-754 (2008) compatible sin, cos, log and etc, but min, max, sqrt, rounding and abs we already has direct equivalents in wasm, so we can use them now |
Sure we can implement direct equalents right away. right now built-in classes and functions are located inside library folder. |
Be sure there are no associated costs for modules that don't use these features. |
Tree shaking should remove unused functions.
So there will be no extra cost.
…On Wed 12. Apr 2017 at 4:32 PM, Wink Saville ***@***.***> wrote:
Be sure there are no associated costs for modules that don't use these
features.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMGZq9tB3h_EE-GiNmmTsGBwi1ONUnIks5rvOBegaJpZM4MorMz>
.
|
@nidin Is it possible use wasm's sqrt, clz, ctz, popcount, copysign and etc now? |
Not yet. No work done in that direction.
You are free to investigate.
…On Wed 12. Apr 2017 at 5:55 PM, Max Graey ***@***.***> wrote:
@nidin <https://github.com/nidin> Is it possible use wasm's sqrt, clz,
ctz, popcount, copysign and etc now?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMGZkyvyTS8mo_YLFfkXEHAvIRcb0bBks5rvPPcgaJpZM4MorMz>
.
|
According to this: https://github.com/WebAssembly/design/blob/master/FAQ.md we need manually implement all sets of js enviroment. This is big job. I could help with this
UPD
I see some stdlib already implement with direct binding to Wasm opcodes.
The text was updated successfully, but these errors were encountered: