Comments (4)
Yeah, this would be interesting to explore. I planned to evaluate it together with the WebAssembly GC proposal when it appears in the engines.
In my use case, I only use reset()
, which recreates the whole WASM memory region and it's super fast. I'm afraid that finalizers might create memory fragmentation which would randomly slow down the allocation of new objects.
Also writing a custom memory allocator in C is something that might be interesting to play with.
from gmp-wasm.
I have one more idea to explore:
- Create a Webpack plugin which uses ESTree or some other JS parsers to automatically transform the callback function into raw GMP calls, when it's possible. It might be interesting to also check if it is possible to implement operator overloading.
from gmp-wasm.
I'm currently playing with building a finalizer-based wrapper that internally calls mpz_t_free
. If I can somehow get it to work, I'll let you know.
from gmp-wasm.
I had a poke over here - https://github.com/jacobp100/mpfr
It does work. My end goal is to have it work with React Native, which doesn't have a finalization registry or wasm. You can provide an exports-like object that calls native functions, but for GC you register your own types with destructors (which is why there's a reference to gcHandle
)
from gmp-wasm.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmp-wasm.