3

Let's say I'm going to write a simple smart-contract to be executed in wasm. Is there any inherit overhead by the language I will use? In particular I'm interested of overhead between following languages:

  • Go
  • C++
  • TypeScript
  • Rust

1 Answer 1

1

Theoretically C++ is the most efficient language, since it is the native language for wasm, no one thinks of writing assembly by hand.

Next are Rust and Go, these probably add some overhead since they provide additional help for the programmer. TypeScript would probably add the most overhead but it really depends on the use case.

There are not a lot of benchmarks since this is all quite new. You can start with whatever language you're most comfortable with and replace with C++ if needed.

Most dApps are not complicated and you can update your code even after it is deployed.

1
  • 1
    Just as a nitpick there is no native language for Wasm that is 100% language agnostic. EOS first generation tooling is built around C++. From virtual machine point of view the smart contract entry point is just a standard C function similar to main() . Commented Aug 8, 2018 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.