title: is Rust's "match" as fast as C's "switch" for bytes?
body: <p>If I have Rust code like:</p>
  
  <pre><code>let x: u8;
  let y = match x {
      0 =&gt; "0",
      1 =&gt; "1",
      // ...
      255 =&gt; "255",
      _ =&gt; unreachable!(),
  };
  </code></pre>
  
  <p>will it be as fast (or faster) than the C code:</p>
  
  <pre><code>byte x;
  char* y;
  switch(x) {
    case 0: y = "0"; break;
    case 1: y = "1"; break;
    ...
    case 255: y = "255"; break;
  }
  </code></pre>
  
  <p>I am wondering if Rust implements anything like a jump table in the assembly.</p>