title: Web Assembly (Wasm), garbage collection
body: <p>I heard Webassembly will be a compilation target for statically typed languages and can be run in the browser. Claims were made that it could run in the browser at (close to) native speed. This is because the Wasm is relatively close to the machine instructions of the appropriate machine. </p>
  
  <p>However there are 2 types of languages that can compile to Wasm:</p>
  
  <ol>
  <li>Languages with garbage collection, e.g. Java, C#</li>
  <li>Languages without garbage collection, e.g. C/C++, Rust</li>
  </ol>
  
  <p>My current understanding is that garbage collection is a process which negatively affects performance because it requires CPU cycles.</p>
  
  <h2>Question:</h2>
  
  <p>Could there be a difference in performance if a Wasm program is either written in a language which has garbage collection versus a language that has none?</p>