Comments (4)
After taking discussions and future-compatability into account, I now believe the best way forward is to use the built-in metering fuel
of wasmtime for the runtime cost calculations.
This has several advantages,
- It simplifies the implementation and optimization of the code, since this is an approach based on compiler middleware that has already been through optimization.
- It removes the restriction of using only clarity as the input language, and allows running wasm from other sources, such as compatability layers, without having to change the code.
- It is more accurate to measure on the wasm instruction level rather than the clarity level, since for example shortcuts in multiplication with smaller numbers will consume less
fuel
, whereas in clarity a large and a small multiplication costs the same.
Note that this is for the runtime cost only, for the read/write count of bytes it makes more sense to do it at the linker level, i.e when the code calls out to the host, which is also compatible with point 2 above.
from clarity-wasm.
i know you're busy now, but could you have a look @obycode ?
from clarity-wasm.
@krl Is this in progress? I'll assign it to you until it's complete. When it's in In Review stage, you'll keep the assignment as you own it getting reviewed.
from clarity-wasm.
Blocked on #409 (removing circular dependencies in code).
from clarity-wasm.
Related Issues (20)
- Stdlib `$is-valid-string-ascii" does not account for all characters
- Validate `define-x` names
- Wrong evaluation order for tuples
- Crosscheck for `replace-at` fails too often due to `ValueTooLarge`
- Testing: `evaluate` and `interpret` should give access to the events
- Improve unit tests coverage for stx-transfer-memo? function HOT 4
- Improve unit tests for token functions HOT 1
- Make design for bottom-up typechecker directly integrated inside the compiler
- OOM issues with `print`
- Separate clar2wasm into the compiler and the runtime
- Function `map` can provoke OOM HOT 1
- The type workaround provokes errors in `append`
- Incorrect error code returned from `secp256k1-recover?`
- Need for a build target in CI
- `replace-at?` should check for the size of the replacement element
- A new bottom-up type-checker needed HOT 4
- compile-time error handling HOT 3
- Property testing for Token functions HOT 1
- Clarity 3 support
- Split property code generation for `get-(burn-)block-info?`
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 clarity-wasm.