Comparison as goto

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Comparison
(function(i) {
 return i > 0
})()
ready
Goto
(function(i) {
 var $g, $0
 $g: while (true) {
  switch ($g) {
  default:
   if (i > 0) {
    $g = 'b1'
    continue $g
   }
   $0 = false
   $g = 'b2'
  case 'b1':
   $0 = true
  case 'b2':
   return $0
  }
 }
})()
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.